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

Re: [Xen-users] using maxmem



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

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

James

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


 


Rackspace

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