[xen-tools-discuss] Debian Wheezy as DomU see less/wrong RAM

Alessio Cecchi alessio at skye.it
Tue Jan 22 22:56:29 CET 2013


Il 2013-01-22 21:50 Andy Smith ha scritto:
> Hi,
>
> On Tue, Jan 22, 2013 at 12:27:27PM +0100, Alessio Cecchi wrote:
>> I'm running Debian Wheezy as Dom0 and with xen-tool (from 
>> repository)
>> I have created a new VM (Debian Wheezy) with 512MB of RAM:
>
> [512M VM sees ~494M RAM]
>
> AFAIK it's a difference between PVOPS and old-style Xen kernels.
>
> There is some small overhead of RAM that is not usable by the OS,
> and this also is the case on bare metal. Old style Xen kernels used
> to take it from dom0, PVOPS kernels take what dom0 gives them and
> deduct from what the VM gets.
>
> Since you'll see a similar amount "missing" on bare metal, I think
> the PVOPS way is more correct. Also the old way means that when you
> give a VM X amount of RAM it actually uses X+Y, whereas PVOPS
> kernels just use X, which is more manageable.
>
> Example old VM running 2.6.18-6-xen-686:
>
> Name                                        ID   Mem VCPUs      State 
>  Time(s)
> etchdemo                                   272   320     1     -b---- 
>   3237.8
>
> $ free -m
>              total       used       free     shared    buffers     
> cached
> Mem:           320        315          4          0        119        
> 61
>
> PVOPS VM on same dom0, 3.2.0-2-686-pae:
>
> Name                                        ID   Mem VCPUs      State 
>  Time(s)
> queue0                                     561   480     1     -b---- 
> 28980.2
>
> $ free -m
>              total       used       free     shared    buffers     
> cached
> Mem:           469        391         78          0         36        
> 212
>
> A bare metal host:
>
> $ free -m
>              total       used       free     shared    buffers     
> cached
> Mem:          3842       3501        340          0          0       
> 2993
>
> This host has 4G of RAM. Of course the more devices on a bare metal
> host mean that more of the physical RAM will be reserved.
>
> Cheers,
> Andy

Thanks for your reply.

I have made some others tests. With Dom0 Wheezy and DomU Squeeze "free 
-m" show exactly the same ram as "xm list". If I copy the Wheezy DomU 
image into CentOS 5 as Dom0 "free" show less memory:

# uname -r
2.6.18-308.24.1.el5xen

# xm list
Name                                      ID Mem(MiB) VCPUs State   
Time(s)
Domain-0                                   0      769     2 r----- 
174284.0
deb7                                      40      512     2 -b----      
7.7

root at deb7:~# free -m
              total       used       free     shared    buffers     
cached
Mem:           373         41        331          0          1         
15

I think that this "problem" is related to Kernel 3.2 in Wheezy.


More information about the xen-tools-discuss mailing list