Huang Yogi
2011-Feb-18 11:22 UTC
[Xen-users] about: memory allocation and the balloon list
Dear all
I use the command( xm mem-set ID mem ) trying to understand the memory
allocation between the Dom0 and the Guests(vm),
but there is still some confusion about this.
As the above /proc/xen/balloon list
I set xm mem-set Domain-0 128
and changing the vm memory from 256 to 128: xm mem-set vm01 128
(...from vm01 to vm08)
before mem-setCurrent allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
after mem-setCurrent allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 416592 kB
High-mem balloon: 3138976 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
xen 2.6.26-2-xen-686 (Debian 4.3.1-2)
# free
total used free shared buffers
cached
Mem: 427792 291612 136180 0 20976 58284
-/+ buffers/cache: 212352 215440
Swap: 2650684 92692 2557992
As the book refer the Low-mem balloon is how much the collection of low-mem can
be expanded(the same goes for the High-mem), so when to start to use the Low-mem
balloon or High-mem balloon? when lack of host (physical) memory and it started
balloon out? When started to create a new vm (the vm given 256 mb), and who
gives the 256mb? It''s from the host(physical) resource memory directly
or the host(physical) resource through the dom0 or the dom0 resource (which has
allocated from the host) ?After changing the (mem-set ID mem) memory value , how
to figure out the changed memory value? Through the /proc/xen/balloon list or
commamd free? or it without notifying Dom0?
4. I have tried to give 2 kinds setting with (xm mem-set Domain-0
128/ xm mem-set vm 128) and (xm mem-set Domain-0 128 xm mem-set vm 256 ) and
there are 8 VMs,
(i) even after changing the ( xm mem-set vm mem) value, the total value(the
sum of Low-mem balloon value and High-mem balloon value) is the same, and what
does the total value meaning?
(ii) Usiing the 2 kind setting to do the Live Migration (and
each vm running a sorting program) as following:
then the result show that: (xm mem-set Domain-0 128/ xm mem-set vm
128) average106.08(sec) is faster than (xm mem-set Domain-0 128 xm mem-set vm
256 ) average 203.46(sec).
but the vm which was 256mb had more resouce but slower finsh livemigrate?
What''s the reason result?
(iii) If I don''t give the (xm mem-set Domain0 mem)or give a big(xm
mem-set Domain0 4000) value , and the livemigration will failure!
what''s the reason? it''s because the dom0 gets too much
resources ?
(xm migrate --live vm01 pc2 & xm migrate --live vm02 pc2 & xm migrate
--live vm03 pc2 & xm migrate --live vm04 pc2 & xm migrate --live vm05
pc2 & xm migrate --live vm06 pc2 & xm migrate --live vm07 pc2 &)
I have read the book (running XEN) and the past xen-user-list but still can not
understand the memory allocation, Could anyone please help to explain these more
detail!
And thanks for your patience!!
Best regards,
Yogi Huang
-chi7396@hotmail.com
process//
(setting 1)
xm mem-set Domain-0 40000
xm mem-set Domain-0 128
ssh yogi-pc2 xm mem-set Domain-0 40000
ssh yogi-pc2 xm mem-set Domain-0 128
for (( k=1 ; k<= ${nu} ; k=k+1 ))
{
xm mem-set vm0${k} 128
}
*************************************
yogi-pc1:/home/yogi/Desktop# sh sh/sh2_vm.sh
start create vm file
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start copy vm img
start create vm.cfg
Using config file "/home/domains/vm01.cfg".
Started domain vm01
Using config file "/home/domains/vm02.cfg".
Started domain vm02
Using config file "/home/domains/vm03.cfg".
Started domain vm03
Using config file "/home/domains/vm04.cfg".
Started domain vm04
Using config file "/home/domains/vm05.cfg".
Started domain vm05
Using config file "/home/domains/vm06.cfg".
Started domain vm06
Using config file "/home/domains/vm07.cfg".
Started domain vm07
Using config file "/home/domains/vm08.cfg".
Started domain vm08
finish create step
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2844.4
vm01 201 256 1 -b---- 4.1
vm02 202 256 1 -b---- 4.1
vm03 203 256 1 -b---- 4.1
vm04 204 256 1 -b---- 4.1
vm05 205 256 1 -b---- 4.1
vm06 206 256 1 -b---- 4.0
vm07 207 256 1 -b---- 3.7
vm08 208 256 1 -b---- 3.7
before mem-set
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2846.7
vm01 201 128 1 -b---- 4.2
vm02 202 128 1 -b---- 4.2
vm03 203 128 1 -b---- 4.2
vm04 204 128 1 -b---- 4.2
vm05 205 128 1 -b---- 4.2
vm06 206 128 1 -b---- 4.2
vm07 207 128 1 -b---- 4.2
vm08 208 128 1 -b---- 4.2
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 1714.7
after mem-set
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 416592 kB
High-mem balloon: 3138976 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
vm start run program
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 416592 kB
High-mem balloon: 3138976 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 416592 kB
High-mem balloon: 3138976 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start livemigrate
finish migrate step
this is pc1_xmlist
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2851.8
migrating-vm01 201 128 1 r----- 13.7
migrating-vm02 202 128 1 r----- 13.4
migrating-vm03 203 128 1 ------ 14.0
migrating-vm04 204 128 1 ------ 13.9
migrating-vm05 205 128 1 r----- 13.6
migrating-vm06 206 128 1 ------ 13.9
migrating-vm07 207 128 1 ------ 13.8
migrating-vm08 208 128 1 ------ 13.9
this is pc2_xmlist
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 1749.7
vm01 201 128 1 ------ 16.6
vm02 203 128 1 r----- 11.3
vm03 198 128 1 r----- 7.2
vm04 200 128 1 r----- 5.1
vm05 204 128 1 ------ 0.3
vm06 197 128 1 --p--- 0.0
vm07 202 128 1 ------ 39.7
vm08 199 128 1 ------ 19.2
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 416592 kB
High-mem balloon: 3138976 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start destroy step
finish destroy step
(setting 2)
xm mem-set Domain-0 40000
xm mem-set Domain-0 128
ssh yogi-pc2 xm mem-set Domain-0 40000
ssh yogi-pc2 xm mem-set Domain-0 128
for (( k=1 ; k<= ${nu} ; k=k+1 ))
{
xm mem-set vm0${k} 256
}
****************************************
yogi-pc1:/home/yogi/Desktop# sh sh/sh2_vm.sh
start create vm file
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 420876 kB
High-mem balloon: 3134692 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start copy vm img
start create vm.cfg
Using config file "/home/domains/vm01.cfg".
Started domain vm01
Using config file "/home/domains/vm02.cfg".
Started domain vm02
Using config file "/home/domains/vm03.cfg".
Started domain vm03
Using config file "/home/domains/vm04.cfg".
Started domain vm04
Using config file "/home/domains/vm05.cfg".
Started domain vm05
Using config file "/home/domains/vm06.cfg".
Started domain vm06
Using config file "/home/domains/vm07.cfg".
Started domain vm07
Using config file "/home/domains/vm08.cfg".
Started domain vm08
finish create step
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2739.4
vm01 193 256 1 -b---- 4.1
vm02 194 256 1 -b---- 4.1
vm03 195 256 1 -b---- 4.1
vm04 196 256 1 -b---- 4.1
vm05 197 256 1 -b---- 4.1
vm06 198 256 1 -b---- 4.0
vm07 199 256 1 -b---- 4.1
vm08 200 256 1 r----- 3.4
before mem-set
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 420876 kB
High-mem balloon: 3134692 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2742.1
vm01 193 256 1 -b---- 4.1
vm02 194 256 1 -b---- 4.1
vm03 195 256 1 -b---- 4.1
vm04 196 256 1 -b---- 4.1
vm05 197 256 1 -b---- 4.1
vm06 198 256 1 -b---- 4.1
vm07 199 256 1 -b---- 4.1
vm08 200 256 1 -b---- 4.1
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 1644.4
after mem-set
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
vm start run program
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
sorting2.out
100% 6768 6.6KB/s 00:00
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start livemigrate
finish migrate step
this is pc1_xmlist
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 2746.6
migrating-vm01 193 256 1 ------ 14.1
migrating-vm02 194 256 1 ------ 14.1
migrating-vm03 195 256 1 r----- 13.5
migrating-vm04 196 256 1 ------ 14.0
migrating-vm05 197 256 1 r----- 14.0
migrating-vm06 198 256 1 ------ 13.6
migrating-vm07 199 256 1 r----- 13.9
migrating-vm08 200 256 1 ------ 14.0
this is pc2_xmlist
Name ID Mem VCPUs State Time(s)
Domain-0 0 128 4 r----- 1699.7
vm01 193 256 1 r----- 6.4
vm02 191 256 1 ------ 14.8
vm03 190 256 1 ------ 59.8
vm04 196 256 1 --p--- 0.0
vm05 192 256 1 --p--- 0.0
vm06 194 256 1 ------ 1.3
vm07 195 256 1 ------ 3.9
vm08 189 256 1 r----- 28.8
Current allocation: 427792 kB
Requested target: 427792 kB
Low-mem balloon: 422532 kB
High-mem balloon: 3133036 kB
Driver pages: 1024 kB
Xen hard limit: ??? kB
start destroy step
finish destroy step
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Huang Yogi
2011-Feb-21 04:04 UTC
[Xen-users] Low-mem balloon value and High-mem balloon value meaning?
Hi all
1. As the book refer the Low-mem balloon is how much the collection of low-mem
can be expanded(the same goes for the High-mem), could anyone can explain it
more detail?
2. When will it start to use the Low-mem balloon value or High-mem
balloon value? when lack of host (physical) memory and it started
balloon out?
3. Whem I started to create a new vm (each vm given 256 mb), and where the
256mb comes from?
It''s from the host(physical) resource memory directly or the
host(physical) resource through the dom0 or the dom0 resource (which has
allocated from the host) ?
4. After changing the (mem-set ID mem) memory value , how to figure out the
changed memory value?
Through the /proc/xen/balloon list or commamd free? or it without
notifying Dom0?
I have read the book (running XEN) and the past xen-user-list but still can not
understand the memory allocation, Could anyone please help to explain these more
detail!
And thanks for your patience!!
Best regards,
Yogi Huang
-chi7396@hotmail.com
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users