[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-users] using maxmem
Le 18/12/2011 05:44, James Harper a écrit :
Hi,
I am using xen 4.0.1 from debian Squeeze repositories and dom0 has kernel
2.6.32-5-xen-amd64(also stock debian).
I wanted to set a high value to maxmem in my xmdomain.cfg vm config files
so that I can increase memory as needed without rebooting.
Unfortunately as soon as I set this paramater I see really wiered things.
For example, I am trying to install a windows HVM guest. When maxmem is
not set, the first screen of the installer appear after less than 30. If I set
maxmem to 12288 (12GB, i guess), the installer screen takes more than
3min30sec to splash...
I have also tried to decrease maxmem to 8GB then 4GB (while
memory=2048)... but that doesn't help... Well I have to say that the lower
maxmem is set, the faster the VM are.
But when set the VM are generally slow and unstable, as I did not succeded
to complete any installl because of guests crashing.
Not sure if it's related but, few times ago, I had an issue while doing live
migration of a PV guest (migration seemed OK but VM was frozen) that also
had maxmem set to such a value... I never experienced livemig problem like
this before...
Is there any options that may be incompatible with maxmem? Or am just
doing bad use of maxmem?
Did anybody experienced similar behaviour?
Okay I just read this too. For Windows HVM to work with PoD memory you'll need PV drivers installed I think so that they allocate the extra memory before Windows gets a chance to touch it. This is a bit tricky during an install but possible during actual use once you have the PV drivers loaded.
Thanks for your replies. Indeed, the need of GPLPV drivers sounds
logical.
I finished installation of windows HVM and installed and activated
GPLPV drivers (0.11.28). Even with GPLPV installed and working, HVM
guest are really very slow as soon as i add maxmem option.
Test: startup time (to ctrl+alt+suppr prompt) of an HVM windows
2008r2 guest:
no maxmem: 48 sec
maxmem=8192: 2 min 53 sec
The way the PoD memory works (which I don't even know if 4.0.1 supports properly), is that the DomU is given "maxmem" amount of memory, but xen only populates "memory" amount of pages with actual memory.
Does this mean that total amount of maxmem on a dom0 have to be
lower or equal to the total amount of physical RAM?
When the DomU touches a page of memory that isn't populated, Xen find a spare page and populates it. If there aren't any spare pages because "memory" pages are already populated, Xen scans for pages which are all 0's and uses one of them, leaving a hole behind. There was a bug causing really bad performance when this happened (see previous email) but even with that fixed, as soon as DomU uses more than "memory" amount of actual pages, you are going to crash.
So don't set "maxmem" > "memory" until you have PV drivers loaded.
As I said above... even with PV drivers, performances are really
poor. Maybe it's related to my version of xen? I will try to setup a
more recent version of Xen with a recent kernel too... if i find
enough spare time.
James
--
Alexandre Chapellon
Ingénierie des systèmes open sources et
réseaux.
Follow me on twitter: @alxgomz
|
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|