WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] about: memory allocation and the balloon list

To: XEN-Users <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] about: memory allocation and the balloon list
From: Huang Yogi <chi7396@xxxxxxxxxxx>
Date: Fri, 18 Feb 2011 19:22:21 +0800
Delivery-date: Fri, 18 Feb 2011 03:24:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
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-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
  • 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

 xen  2.6.26-2-xen-686 (Debian 4.3.1-2)
# free
                       total       used       free     shared    buffers     cached
Mem:   & nbsp;   427792     291612     136180          0      20976      58284
-/+ buffers/cache:     212352     215440
Swap:      2650684      92692    2557992

  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), 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?  
  2. 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 alloca ted from the host) ?
  3. 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@xxxxxxxxxxx

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                                    &nb sp;   ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   128     4     r-----   2844.4
vm01                                       201   256     1     -b----      4.1
vm02                                    & nbsp;  202   256     1     -b----      4.1
vm03                                       203   256     1     -b----      4.1
vm04                                       204   256     1     -b----      4.1
vm05                           &nbs p;           205   256     1     -b----      4.1
vm06                                       206   256     1     -b----      4.0
vm07                                       207   256     1     -b----      3.7
vm08                   & nbsp;                   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     & nbsp;                               0   128     4     r-----   2846.7
vm01                                       201   128     1     -b----      4.2
vm02                                       202   128     1     -b----      4.2
vm03 &nb sp;                                     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: &nb sp;         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                                                                       &nb sp;      100% 6768     6.6KB/s   00:00
sorting2.out                                                                              100% 6768     6.6KB/s   00:00
sorting2.out                                                         & nbsp;                    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                            &nb sp;                                                 100% 6768     6.6KB/s   00:00
sorting2.out                                                                              100% 6768     6.6KB/s   00:00
Current allocation:   427792 kB
Requested target:     427792 kB< br>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----- &nbs p; 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              &nb sp;              204   128     1     ------     13.9
migrating-vm05                             205   128     1     r-----     13.6
migrating-vm06                             206   128     1     ------     13.9
migrating-vm07                             207   128  & nbsp;  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 &n bsp;   r-----   1749.7
vm01                                       201   128     1     ------     16.6
vm02                                       203   128     1     r-----     11.3
vm03                                       198   128 &n bsp;   1     r-----      7.2
vm04                                       200   128     1     r-----      5.1
vm05                                       204   128     1     ------      0.3
vm06                                  & nbsp;    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:      &nbs p;    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&nbs p;  Mem VCPUs      State   Time(s)
Domain-0                                     0   128     4     r-----   2739.4
vm01                                       193   256     1     -b----      4.1
vm02                                       194 & nbsp; 256     1     -b----      4.1
vm03                                       195   256     1     -b----      4.1
vm04                                       196   256     1     -b----      4.1
vm05                               &n bsp;       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     & nbsp;                                 195   256     1     -b----      4.1
vm04                                       196   256     1     -b----      4.1
vm05                                       197   256     1     -b----   &nbs p;  4.1
vm06                                       198   256     1     -b----      4.1
vm07                                       199   256     1     -b----      4.1
vm08                                       200   256     1&n bsp;    -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:     & nbsp;     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                                                                            &n bsp; 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                                               &nbs p;                              100% 6768     6.6KB/s   00:00
sorting2.out                                                                              100% 6768     6.6KB/s   00:00
sorting2.out                                 &n bsp;                                            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: &nbs p;    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  &nbs p;                          193   256     1     ------     14.1
migrating-vm02                             194   256     1     ------     14.1
migrating-vm03                             195   256     1     r-----     13.5
migrating-vm04                     &nbs p;       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< br>vm01                                       193   256     1     r-----      6.4
vm02                                       191   256     1     ------     14.8
vm03                                       190   256     1   &n bsp; ------     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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>