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

Re: [Xen-users] dynamic memory extension not working on Debian Squeeze


  • To: xen-users <xen-users@xxxxxxxxxxxxx>
  • From: Peter Viskup <skupko.sk@xxxxxxxxx>
  • Date: Thu, 15 Nov 2012 01:17:41 +0100
  • Delivery-date: Thu, 15 Nov 2012 00:19:10 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

On 11/14/2012 07:29 PM, Alexandre Kouznetsov wrote:
Hello, Ian.

I have been living with the same problem for years. I guess it worked on Etch with kernel 2.6.18, not sure about Lenny and 2.6.26. In my case, xenstore works fine.

The symptom is: after using mem-set, it apparently works, but the DomU still thinks it has the old memory size. The issue shows up only when increasing memory above the original size, the reduction work fine. I have read the rest of the thread, and it seems Peter is stuck in some xenstore issue. I suspect xenstore might be unrelated: in my case it works fine, but mem-set still have the issue.

The OS on Dom0 and DomU is a regular Debian Squeeze, no backports or custom build packages. It has been seen on different models of Dell PowerEdge servers. If relevant, I can confirm for a commodity hardware case, or for a Debian Wheezy case (upgraded from Squeeze, not a clean install). I have no other OS at hand than Debian to test.

The output of "xenstore-ls -fp" that you asked remains unchanged, so I will post it only once:
root@on05:~# xenstore-ls -fp | grep scoutapi-dev
/vm/8b7714b8-eeb0-2120-cee7-59273be76f79/name = "scoutapi-dev"   (n0)
/local/domain/0/backend/vbd/12/51715/domain = "scoutapi-dev"   (n0,r12)
/local/domain/0/backend/vbd/12/51715/params = "/dev/r5VG/scoutapi-dev-srv" (n0,r12)
/local/domain/0/backend/vbd/12/51714/domain = "scoutapi-dev"   (n0,r12)
/local/domain/0/backend/vbd/12/51714/params = "/dev/r5VG/scoutapi-dev-root" (n0,r12)
/local/domain/0/backend/vbd/12/51713/domain = "scoutapi-dev"   (n0,r12)
/local/domain/0/backend/vbd/12/51713/params = "/dev/r5VG/scoutapi-dev-swap" (n0,r12)
/local/domain/0/backend/vif/12/0/domain = "scoutapi-dev"   (n0,r12)
/local/domain/0/backend/console/12/0/domain = "scoutapi-dev"   (n0,r12)
/local/domain/12/name = "scoutapi-dev"   (n0,r12)


# DomU scoutapi-dev initially has assigned 256MB
root@on05:~# xm list|grep scoutapi-dev
scoutapi-dev                      12   256     1     -b----      8.8

# ...and it can see that amount
root@scoutapi-dev:~# free -m|grep -B 1 "Mem"
       total       used       free     shared    buffers     cached
Mem:     252         70        182          0          4         38
root@scoutapi-dev:~# cat /proc/meminfo |grep MemTotal
MemTotal:         258908 kB
root@scoutapi-dev:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
262144


# I increase scoutapi-dev's memory on Dom0
root@on05:~# xm mem-set scoutapi-dev 512
root@on05:~# xm list|grep scoutapi-dev
scoutapi-dev                      12   512     1     -b----      9.0

# DomU seems to be aware of the change (target_kb) but does not use it
root@scoutapi-dev:~# free -m|grep -B 1 "Mem"
         total       used       free     shared    buffers     cached
Mem:       252         70        182          0          4         38
root@scoutapi-dev:~# cat /proc/meminfo |grep MemTotal
MemTotal:         258908 kB
root@scoutapi-dev:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
262144


# Now I reduce scoutapi-dev's memory
root@on05:~# xm mem-set scoutapi-dev 128
root@on05:~# xm list|grep scoutapi-dev
scoutapi-dev                        12   128     1     -b----      9.1

# DomU can see the change as expected
root@scoutapi-dev:~# free -m|grep -B 1 "Mem"
         total       used       free     shared    buffers     cached
Mem:       128         70         58          0          4         38
root@scoutapi-dev:~# cat /proc/meminfo |grep MemTotal
MemTotal:         131676 kB
root@scoutapi-dev:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
131072

# Finally, I increase DomU memory to it's original size:
root@on05:~# xm mem-set scoutapi-dev 256
root@on05:~# xm list|grep scoutapi-dev
scoutapi-dev                        12   256     1     -b----      9.2

# DomU can see the increase fine, it seems to have problem
# only if it the new size is bigger than the original.
root@scoutapi-dev:~# free -m|grep -B 1 "Mem"
         total       used       free     shared    buffers     cached
Mem:       252         70        182          0          4         38
root@scoutapi-dev:~# cat /proc/meminfo |grep MemTotal
MemTotal:         258908 kB
root@scoutapi-dev:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
262144


# This is my config.
# It has been created by xen-tools, but i use a custom
# xen-tools.con and xm.tmpl
root@on05:~# cat /etc/xen/scout-dev.cfg
#
# Configuration file for the Xen instance scout-dev, created
# by xen-tools 4.2 on Tue Nov 13 19:02:28 2012.

name        = 'scout-dev'
memory      = '256'
maxmem      = '8192'
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/r5VG/scout-dev-srv,xvda3,w',
                  'phy:/dev/r5VG/scout-dev-root,xvda2,w',
                  'phy:/dev/r5VG/scout-dev-swap,xvda1,w',
              ]
vif         = [
                'ip=11.22.33.44,mac=00:16:3E:72:7B:5A,bridge=xenbr55',
              ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

root@on05:~# dpkg -la|grep xen|awk '{print $1"\t "$2"\t"$3}'
ii     libxenstore3.0    4.0.1-5.4
ii     linux-image-2.6.32-5-xen-amd64    2.6.32-46
ii     xen-hypervisor-4.0-amd64    4.0.1-5.4
ii     xen-linux-system-2.6.32-5-xen-amd64    2.6.32-46
ii     xen-qemu-dm-4.0    4.0.1-2+squeeze2
ii     xen-tools    4.2-1
ii     xen-utils-4.0    4.0.1-5.4
ii     xen-utils-common    4.0.0-1
ii     xenstore-utils    4.0.1-5.4
ii     xenwatch    0.5.4-2
root@on05:~# uname -a
Linux on05 2.6.32-5-xen-amd64 #1 SMP Sun Sep 23 13:49:30 UTC 2012 x86_64 GNU/Linux


If you can bring some light on it, that would be just wonderful.

Greetings.


Hi Ian and Alexander,
it's good to hear I am not the onlyone experienced this issue.
The removal of tdb file solved the xenstore issue.
Now I am able to provide you the outputs you requested. They are very similar to those provided by Alexander.

server1:~# xenstore-ls -fp | grep ldap
/vm/2fad68ca-0fc8-b3ea-dac2-b54f713af36d/name = "ldap"   (n0)
/local/domain/0/backend/vbd/2/51713/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51713/params = "system_vhosts/ldap-disk" (n0,r2)
/local/domain/0/backend/vbd/2/51714/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51714/params = "system_vhosts/ldap-swap" (n0,r2)
/local/domain/0/backend/vbd/2/51715/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51715/params = "system_vhosts/ldap-var" (n0,r2)
/local/domain/0/backend/vbd/2/51716/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51716/params = "system_vhosts/ldap-varlog" (n0,r2)
/local/domain/0/backend/vbd/2/51717/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51717/params = "system_vhosts/ldap-tmp" (n0,r2)
/local/domain/0/backend/vbd/2/51718/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vbd/2/51718/params = "system_vhosts/ldap-usr" (n0,r2)
/local/domain/0/backend/vif/2/0/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vif/2/0/vifname = "ldap-pub"   (n0,r2)
/local/domain/0/backend/vif/2/1/domain = "ldap"   (n0,r2)
/local/domain/0/backend/vif/2/1/vifname = "ldap-pri"   (n0,r2)
/local/domain/0/backend/console/2/0/domain = "ldap"   (n0,r2)
/local/domain/2/name = "ldap"   (n0,r2)

I just increased the memory for ldap domU to 512MB:
ldap:~# grep MemTotal /proc/meminfo
MemTotal:         250320 kB
ldap:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
262144
ldap:~# grep MemTotal /proc/meminfo
MemTotal:         250320 kB
ldap:~# cat /sys/devices/system/xen_memory/xen_memory0/target_kb
524288

but the real memory size didn't changed. Shrinking of the memory is working well - but I am not able to increase the size of the memory above the initial size. Let me state once again, that this memory increase is working well with kernel 2.6.26-2-xen.
Hope we will be able to solve this issue.

Best regards,
--
Peter Viskup

_______________________________________________
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®.