As I understand concept of xenballooning, it allow to take memory from guest and return it to hypervisor. This allow to reduce amount of memory allocated to VM in realtime without rebooting VM. But how we can add more memory to guest VM in realtime, than was at boot time? Can we somehow make balloon inflated at start time? (F.e. VM starts with memory = 512Mb and balloon inflating to +512Mb). Thank you. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
George Shuklin wrote:>But how we can add more memory to guest VM in realtime, than was at boot >time? > >Can we somehow make balloon inflated at start time? (F.e. VM starts with >memory = 512Mb and balloon inflating to +512Mb).Yes, you can do that, and it took me a while to find out how. In your config file put something like this : memory = ''512'' maxmem = ''1024'' As I understnad it, it will start the guest with (in this example) 512M of RAM, but you can use "xm mem-set nnn" to increase that within the bounds of the maxmem setting. If increasing, the extra memory is hotplugged into the client. When decreasing, I assume there is a process for getting the client to free up the memory before it is hotplug removed. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Jul 29, 2010 at 9:58 PM, Simon Hobson <linux@thehobsons.co.uk> wrote:> George Shuklin wrote: >> Can we somehow make balloon inflated at start time? (F.e. VM starts with >> memory = 512Mb and balloon inflating to +512Mb). > > Yes, you can do that, and it took me a while to find out how. In your config > file put something like this : > memory = ''512'' > maxmem = ''1024'' > > As I understnad it, it will start the guest with (in this example) 512M of > RAM, but you can use "xm mem-set nnn" to increase that within the bounds of > the maxmem setting. If increasing, the extra memory is hotplugged into the > client. When decreasing, I assume there is a process for getting the client > to free up the memory before it is hotplug removed.Note two caveats: (1) In order to allow the additional memory to be hot-add later, some memory needs to be allocated to maintain the maximum amount of memory address that will be available. And that can be a waste. So while the above (memory=512/maxmem=1024) is a good example, it wouldn''t make sense to have something like maxmem having 10 times the amount of memory, cause the overhead will be too big (from my test, the overhead was about 4.8M or 16% of the original memory with memory=30/maxmem=300 setup) (2) Last time I check, it didn''t work with Ubuntu Lucid stock pv_ops kernel (linux-image-server or linux-image-virtual). It simply use the value in "maxmem" from the start. It works great with RHEL-5''s kernel-xen or novell''s xenified kernel though. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> (2) Last time I check, it didn''t work with Ubuntu Lucid stock pv_ops > kernel(linux-image-server or linux-image-virtual). In other words : # aptitude install linux-image-server would install pv_ops kernel on Lucid Server ? What version of kernel it ''s supposed to be ? Boris. --- On Thu, 7/29/10, Fajar A. Nugraha <fajar@fajar.net> wrote: From: Fajar A. Nugraha <fajar@fajar.net> Subject: Re: [Xen-users] xenballooning To: "Xen User-List" <xen-users@lists.xensource.com> Date: Thursday, July 29, 2010, 11:52 AM On Thu, Jul 29, 2010 at 9:58 PM, Simon Hobson <linux@thehobsons.co.uk> wrote:> George Shuklin wrote: >> Can we somehow make balloon inflated at start time? (F.e. VM starts with >> memory = 512Mb and balloon inflating to +512Mb). > > Yes, you can do that, and it took me a while to find out how. In your config > file put something like this : > memory = ''512'' > maxmem = ''1024'' > > As I understnad it, it will start the guest with (in this example) 512M of > RAM, but you can use "xm mem-set nnn" to increase that within the bounds of > the maxmem setting. If increasing, the extra memory is hotplugged into the > client. When decreasing, I assume there is a process for getting the client > to free up the memory before it is hotplug removed.Note two caveats: (1) In order to allow the additional memory to be hot-add later, some memory needs to be allocated to maintain the maximum amount of memory address that will be available. And that can be a waste. So while the above (memory=512/maxmem=1024) is a good example, it wouldn''t make sense to have something like maxmem having 10 times the amount of memory, cause the overhead will be too big (from my test, the overhead was about 4.8M or 16% of the original memory with memory=30/maxmem=300 setup) (2) Last time I check, it didn''t work with Ubuntu Lucid stock pv_ops kernel (linux-image-server or linux-image-virtual). It simply use the value in "maxmem" from the start. It works great with RHEL-5''s kernel-xen or novell''s xenified kernel though. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Jul 29, 2010 at 11:10 PM, Boris Derzhavets <bderzhavets@yahoo.com> wrote:> > > (2) Last time I check, it didn''t work with Ubuntu Lucid stock pv_ops > > kernel (linux-image-server or linux-image-virtual). > > In other words : > # aptitude install linux-image-server > would install pv_ops kernel on Lucid Server ?it''d install a kernel with Xen pv_ops domU support enabled, suitable for PV domU (not dom0). This is different from linux-image-generic, which has the feature disabled. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
В Чтв, 29/07/2010 в 22:52 +0700, Fajar A. Nugraha пишет:> On Thu, Jul 29, 2010 at 9:58 PM, Simon Hobson <linux@thehobsons.co.uk> wrote: > > George Shuklin wrote: > >> Can we somehow make balloon inflated at start time? (F.e. VM starts with > >> memory = 512Mb and balloon inflating to +512Mb). > > > > Yes, you can do that, and it took me a while to find out how. In your config > > file put something like this : > > memory = ''512'' > > maxmem = ''1024'' > > > > As I understnad it, it will start the guest with (in this example) 512M of > > RAM, but you can use "xm mem-set nnn" to increase that within the bounds of > > the maxmem setting. If increasing, the extra memory is hotplugged into the > > client. When decreasing, I assume there is a process for getting the client > > to free up the memory before it is hotplug removed. > > Note two caveats: > (1) In order to allow the additional memory to be hot-add later, some > memory needs to be allocated to maintain the maximum amount of memory > address that will be available. And that can be a waste. So while the > above (memory=512/maxmem=1024) is a good example, it wouldn''t make > sense to have something like maxmem having 10 times the amount of > memory, cause the overhead will be too big (from my test, the overhead > was about 4.8M or 16% of the original memory with memory=30/maxmem=300 > setup) > (2) Last time I check, it didn''t work with Ubuntu Lucid stock pv_ops > kernel (linux-image-server or linux-image-virtual). It simply use the > value in "maxmem" from the start. It works great with RHEL-5''s > kernel-xen or novell''s xenified kernel though.Thank you. Some more information about reserved memory (in our work we call it ''stealed''). This memory depends on max_memory (in term of xen cloud platform - memory-static-max), and (in %) become lower, as max-mem raising. In range 4-8-16Gb it is about 1-10% of memory (so we can use range 320-3Gb without any problems). here my experimental data (both in Mb): MAXMEM STEAL 256 8,0 320 8,9 512 10,9 1024 16,2 2048 25,2 3072 34,3 4096 43,3 5120 52,3 6144 61,3 As you can see, 61Mb for 300Mb minimum with 6Gb maximum is not so bad... _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users