suyash jape
2007-Oct-17 16:09 UTC
[Xen-users] Re : ha cluster with virtual machines as resources
Hi As far as i have played with Xen , You can dynamically allocate RAM to a running VM but the OS inside the VM is NOT able to detect the increased RAM and therefore cannot utilize it. If you reboot the VM , then on reboot it will show the increased memory. ( Conditions like max mem are assumend to be satified) Any of he Xen devel guys have a update on this ?? OpenVZ can allocate dynamically successfully. Suyash _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dominik Klein
2007-Oct-18 13:39 UTC
Re: [Xen-users] Re : ha cluster with virtual machines as resources
> As far as i have played with Xen , You can dynamically allocate RAM to > a running VM but the OS inside the VM is NOT able to detect the > increased RAM and therefore cannot utilize it. > If you reboot the VM , then on reboot it will show the increased memory. > ( Conditions like max mem are assumend to be satified)If I''m not completely off here, Linux PVM domUs *do* see and utilize it. Adding memory is not a big problem, reducing the amount of memory is one. Just imagine a process using 500 megs and you take away 200 of that while it is running. If you have 200 megs of unused memory, this should work, though. Regards Dominik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Oct-18 17:47 UTC
Re: [Xen-users] Re : ha cluster with virtual machines as resources
My comments below are aimed at paravirtualised XenLinux - HVM is a different kettle of fish ;-)> > As far as i have played with Xen , You can dynamically allocate RAM to > > a running VM but the OS inside the VM is NOT able to detect the > > increased RAM and therefore cannot utilize it. > > If you reboot the VM , then on reboot it will show the increased memory. > > ( Conditions like max mem are assumend to be satified) > > If I''m not completely off here, Linux PVM domUs *do* see and utilize it. > > Adding memory is not a big problem, reducing the amount of memory is > one. Just imagine a process using 500 megs and you take away 200 of that > while it is running. If you have 200 megs of unused memory, this should > work, though.XenLinux VM behaviour when expanding their memory is a little unintuitive. When Linux boots, it builds a memory map - the size of this map determines how much memory Linux can handle. The default is this to size this according to the starting size of the memory Xen gives it. The result is that you can shrink the memory and regrow it back to its original size but not grow it beyond the original allocation. You can pass a command line to tell Linux how much memory it should accommodate. Edit the extra= section of your vm config to include "mem=4G". This will tell Linux that it should accommodate up to 4 gigabytes of ram, which is enough for most people! If you need a different value you can substitute that here. Once you''ve done that you can use the xm mem-max and xm mem-set commands to control the Xen-enforced size limit of the domain and request the domain grow or shrink, respectively. Dominik has a good point, by the way: to be careful when reducing the size of a domain. This can have unfortunate consequences if done overly aggressively. Things can get particularly problematic if you resize a domain a long way below its original allocation. Hope this helps you. Happy resizing ;-) Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users