Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

Re: [Xen-devel] Dynamic Memory Management and Migration (3.0.4-0)

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] Dynamic Memory Management and Migration (3.0.4-0)
From: Timo Benk <timo.benk@xxxxxx>
Date: Wed, 31 Jan 2007 23:58:00 +0100
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 31 Jan 2007 14:58:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070131172756.GB9956@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=67E2E5E9; url=http://m28s01.vlinux.de/timo_benk_gpg_key.asc
References: <45C0B5D5.5010103@xxxxxx> <20070131172756.GB9956@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20061206)
Daniel P. Berrange wrote:
> On Wed, Jan 31, 2007 at 04:29:25PM +0100, Timo Benk wrote:
>> Hello,
>>
>> i noticed the following Problem:
>>
>> if i want to allow dynamic memory management of Linux-domains, i need to
>> set the following kernel parameter. Otherwise it is not possible, to
>> increase the memory of the domain above the initial assigned value:
>>
>> extra = "mem=10240M"
> 
> That should not be neccessary. We fixed the Hypervisor to implement the
> neccessary magic so that XenD can utilize the 'maxmem' parameter in
> guest config files correctly So for example
> 
>   mem=500
>   maxmem=800
> 
> Will make the guest VM boot up with 500 MB of initial RAM. It will also
> tell it to allocate page tables entries big enough to address 800 MB of
> RAM. So after boot up, you will be able to balloon the guest upto this
> maxmimum of 800 MB simply using 'xm mem-set 800'.
A quick test with 3.0.4-0 does not work on my side. I will try it again
tomorrow with 3.0.4-1. I dunno when the patch was applied to the xen source.

Her is what i have tried:

Domain-0:~ # xm create /etc/xen/vm/xendom1 -n
Using config file "/etc/xen/vm/xendom1".
(vm
    (name xendom1)
    (memory 256)
    (maxmem 512)
    (vcpus 1)
    (on_xend_start ignore)
    (on_xend_stop ignore)
    (cpu_cap 100)
    (cpu_weight 100)
    (image
        (linux
            (kernel /boot/vmlinuz-2.6.16.33-xenU)
            (ramdisk /boot/initrd-2.6.16.33-xenU)
            (root '/dev/sda1 ro')
        )
    )
    (device (vbd (uname phy:/dev/xenvol/xendom1_root) (dev sda1) (mode w)))
    (device (vbd (uname phy:/dev/xenvol/xendom1_swap) (dev sda2) (mode w)))
    (device (vif (mac 00:11:25:67:30:65)))
)

Domain-0:~ # xm create /etc/xen/vm/xendom1
Using config file "/etc/xen/vm/xendom1".
Started domain xendom1

Domain-0:~ # xm list
Name                                      ID   Mem VCPUs      State   Time(s)
Domain-0                                   0  2265     1     r-----   4834.5
xendom1                                    6   256     1     -b----      4.3

Domain-0:~ # xm mem-set xendom1 300
Domain-0:~ # xm list
Name                                      ID   Mem VCPUs      State   Time(s)

Domain-0                                   0  2265     1     r-----   4835.2
xendom1                                    6   257     1     ------     13.1

Domain-0:~ # ssh root@xxxxxxxxxxxx
Last login: Wed Jan 31 23:56:00 2007 from 172.17.0.1
xendom1:~ # free
             total       used       free     shared    buffers     cached
Mem:        262384     108404     153980          0       5840      63840
-/+ buffers/cache:      38724     223660
Swap:       524280          0     524280

xendom1:~ # logout
Connection to 172.17.0.101 closed.

Domain-0:~ # xm mem-set xendom1 400
Domain-0:~ # ssh root@xxxxxxxxxxxx
Last login: Wed Jan 31 23:56:08 2007 from 172.17.0.128
xendom1:~ # free
             total       used       free     shared    buffers     cached
Mem:        262384     108908     153476          0       6388      63812
-/+ buffers/cache:      38708     223676
Swap:       524280          0     524280
xendom1:~ #


Greetings,
-timo
-- 
Timo Benk - Jabber ID: fry@xxxxxxxxxxxx - ICQ ID: #414944731
PGP Public Key: http://m28s01.vlinux.de/timo_benk_gpg_key.asc


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