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] Memory management questions

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Memory management questions
From: Michael Heyse <mhk@xxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 13:09:34 +0100
Delivery-date: Wed, 11 Jan 2006 12:16:09 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
Hi,

please help me understand xen's memory management and the balloon driver
a little bit better.

setup: xen-3.0-testing-20051206 (installed with gentoo's xen-3.0.0-r2
ebuild), Kernel 2.6.12.6-xen
total RAM: 1G (no swap for this test)
dom0 parameters:
    - dom0_mem=768M (grub config)
    - dom0-min-mem 196 (xend-config.sxp)
dom1 parameters: memory=128, extra="mem=768M"
dom2 parameters: memory=256, extra="mem=768M"

If I understood correctly how the ballon driver works, this should boot
dom0 with 768M available initially and automatically ballooning it down
to not less than 196M if memory is needed by other domains. dom1 and
dom2 should start with 128M and 256M respectively, with the option of
ballooning both to a max of 768M with the "xm mem-set" command run from
dom0. After all domains are booted, `xm list` gives me

Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      586     1 r-----   118.0
dom1                               1      128     1 -b----    32.6
dom2                               2      256     1 -b----    30.3

and `cat /proc/meminfo` shows a MemTotal of 775108 kB in dom1 and dom2
with reasonable MemFree values of approx. 80M and 220M respectively,
which looks all right to me. Did I get it until here?

Now suppose I want to compile glibc in dom1 which needs lots of memory.
So I do a

xm mem-set 1 768M

`xm list` now shows
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      586     1 r-----   120.3
dom1                               1      768     1 -b----    32.7
dom2                               2      256     1 -b----    30.3

which I don't understand, because now the sum of memory used exceeds the
1G system total. Shouldn't xm complain here? Also, `xm top` still shows
a MAXMEM of 131072 for dom1, and `cat /proc/meminfo` in dom1 doesn't
show a change at all. And there definitely isn't more memory available
in dom1, because if I mount a tmpfs on ~/test and do a `dd if=/dev/zero
of=~/test/test` the oom-killer kicks in as soon as the file size reaches
approx. 100M. The same thing happens if I'm less greedy and do a `xm
mem-set 1 256M`, which should work with the available memory. So it
looks like my ballooning attempt failed.

So what did I do wrong?

Thanks,
Michael

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>