[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] dynamic memory extension works on Debian Wheezy


  • To: xen-users@xxxxxxxxxxxxx
  • From: Alexandre Kouznetsov <alk@xxxxxxxxxx>
  • Date: Tue, 20 Nov 2012 23:51:36 -0600
  • Delivery-date: Wed, 21 Nov 2012 05:53:07 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hello.

I have made the tests on a Wheezy box, a much smaller machine. It's not a fresh install, but upgraded from Squeeze, it's visible in the installed packages list. The dmesg shows some residues of my IOMMU tests, I believe they do not affect mem-set behavior.

Using Xen 4.1, kernel 3.2.0 on Dom0 and kernel 2.6.32 on DomU system gave the same result as before, the memory can't be grown beyond initial size.

Using the same setup, but kernel 3.2.0 on DomU, mem-set was successful beyond the initial size. I just tested to grow from .5G to 1G, which proves the concept. Somebody ate 62MB of RAM from my DomU (difference between meminfo and xen_memory0/target_kb).

I conclude that Squeeze's Xen kernel has the ballooning functionality broken somehow. Moving from 2.6.32 to 3.2.0 made the difference. There are little hopes of a fix: Squeeze is very close to become "oldstable", so we shall just move on forward. I believe (although did not tested) the upgrade of the hypervisor itself from 4.0 to 4.1 had little to do.

root@lor01:~# uname -a
Linux lor01 3.2.0-2-amd64 #1 SMP Mon Jun 11 17:24:18 UTC 2012 x86_64 GNU/Linux
root@lor01:~# dpkg -la|grep xen|awk '{print $1"\t "$2"\t"$3}'
ii       libxen-4.1     4.1.2-6
ii       libxenstore3.0 4.1.2-6
ii       linux-image-2.6.32-5-xen-amd64 2.6.32-41squeeze2
ii       xen-hypervisor-4.0-amd64       4.0.1-4
ii       xen-hypervisor-4.1-amd64       4.1.2-6
ii       xen-linux-system-2.6.32-5-xen-amd64    2.6.32-41squeeze2
ii       xen-qemu-dm-4.0        4.0.1-2+squeeze1
ii       xen-tools      4.2.1-1
ii       xen-utils-4.0  4.0.1-4
ii       xen-utils-4.1  4.1.2-6
ii       xen-utils-common       4.1.2-6
ii       xenstore-utils 4.1.2-6
ii       xenwatch       0.5.4-3
root@lor01:~# cat /etc/xen/sso.cfg
#
# Configuration file for the Xen instance sso, created
# by xen-tools 4.2 on Wed Feb 29 22:40:17 2012.
name        = 'sso'
memory      = '512'
maxmem      = '3328'
vcpus       = '1'
kernel      = '/boot/vmlinuz-2.6.32-5-xen-amd64'
ramdisk     = '/boot/initrd.img-2.6.32-5-xen-amd64'
root        = '/dev/xvda2 ro'
disk        = [
                  'phy:/dev/mirrorVG/sso-data,xvda3,w',
                  'phy:/dev/mirrorVG/sso-root,xvda2,w',
                  'phy:/dev/mirrorVG/sso-swap,xvda1,w',
              ]
vif         = [
                   'ip=1.2.3.4,mac=00:16:3E:86:59:3E,bridge=xenbr01',
              ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

root@lor01:~# xm dmesg
(XEN) Xen version 4.1.2 (Debian 4.1.2-6) [...]
[ ... output attached as Wheezy_Dom0_xm-dmesg.txt ... ]
root@lor01:~# xm create sso.cfg
Using config file "/etc/xen/sso.cfg".
Started domain sso (id=10)
root@lor01:~# xm list|grep sso
sso                        10   512     1     -b----      2.2
root@lor01:~# xenstore-ls -fp | grep target | grep "(n10)"
/local/domain/10/memory/target = "524288"   (n10)

root@sso:~# uname -a
Linux sso 2.6.32-5-xen-amd64 #1 SMP Thu Mar 22 21:14:26 UTC 2012 x86_64 GNU/Linux
root@sso:~# dmesg
[ ... output attached as DomU_dmesg_2.6.32.txt ... ]
root@sso:~# cat /proc/meminfo |grep MemTotal
MemTotal:         521052 kB
root@sso:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
524288

root@lor01:~# xm mem-set sso 1024
root@lor01:~# xm list|grep sso
sso                            10  1024     1     -b----      2.3
root@lor01:~# xenstore-ls -fp | grep target | grep "(n10)"
/local/domain/10/memory/target = "1048576"   (n10)

root@sso:~# cat /proc/meminfo |grep MemTotal
MemTotal:         521052 kB
root@sso:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
1048576
root@sso:~# dmesg
[ ... no change ... ]

# Now I copy Dom0's /lib/modules/3.2.0-2-amd64 to "sso" host and change sso.cfg to use 3.2.0 kernel.

root@lor01:~# xm create sso.cfg
Using config file "/etc/xen/sso.cfg".
Started domain sso (id=11)
root@lor01:~# xm list|grep sso
sso                           11   512     1     -b----      2.2
root@lor01:~# xenstore-ls -fp | grep target | grep "(n11)"
/local/domain/11/memory/target = "524288"   (n11)

root@sso:~# uname -a
Linux sso 3.2.0-2-amd64 #1 SMP Mon Jun 11 17:24:18 UTC 2012 x86_64 GNU/Linux
root@sso:~# dmesg
[ ... output attached as DomU_dmesg_3.2.0.txt ... ]
root@sso:~# cat /proc/meminfo |grep MemTotal
MemTotal:         460880 kB
root@sso:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
524288

root@lor01:~# xm mem-set sso 1024
root@lor01:~# xm list|grep sso
sso                         11  1024     1     -b----      2.4
root@lor01:~# xenstore-ls -fp | grep target | grep "(n11)"
/local/domain/11/memory/target = "1048576"   (n11)
root@lor01:~# xm dmesg
[ ... same as before, plus the following ... ]
(XEN) traps.c:2432:d10 Domain attempted WRMSR 00000000c0010048 from 0x0000000000780000 to 0x0000000000780400. (XEN) traps.c:2432:d11 Domain attempted WRMSR 00000000c0010048 from 0x0000000000780000 to 0x0000000000780400. (XEN) traps.c:2432:d11 Domain attempted WRMSR 00000000c0010004 from 0x0000d7dea1ae17df to 0x000000000000abcd.

root@sso:~# cat /proc/meminfo |grep MemTotal
MemTotal:         985168 kB
root@sso:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
1048576
root@sso:~# dmesg
[ ... no change ... ]
root@sso:~# free -m
       total       used       free     shared    buffers     cached
Mem:     962         39        922          0          3         12
-/+ buffers/cache:   22        939
Swap:   2047          0       2047


--
Alexandre Kouznetsov

Attachment: Wheezy_Dom0_xm-dmesg.txt
Description: Text document

Attachment: DomU_dmesg_3.2.0.txt
Description: Text document

Attachment: DomU_dmesg_2.6.32.txt
Description: Text document

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.