Hi all, I''m trying to tune some memory parameters in my dom0 and domUs, and got stuck. I''ve been googling, but can''t find something "straightforward" ;) I have a dom0 with 2GB RAM, and have 5 domUs in it, using Xen 3.1.0 with kernel 2.6.18, all installed through Debian packages. My dom0 is launched with xenhopt=dom0_mem=256MB in grub''s /boot/grub/menu.lst. I''ve created all my domUs with the following memory parameters: ---- memory = ''128'' maxmem = ''1024'' shadow_memory = 8 ---- My domUs have a swap partition, and I''ve setted the kernel''s swappiness to 0. With this config, I understand that the domUs will be started with an starting amount of 128 MB RAM, and they will grow the amount used according to their needs and availability. Well. No. They begin swapping :/ In one domU, that is using almost all the initial memory, when disabling the swap and launching another process, the OOM killer start killing processes. I''ve read something about a "balloon driver" that should do the magic, but it all refers to info prior to 2006. In a chat script someone said that it is now handled with the "mem-set/mem-max" parameters. There was also some other guy telling about /proc/xen/balloon, but couldn''t find any detailed info on that either. By now, I''m suspicious that I''ve missunderstood the memory handling in Xen :) Can you tell me if xen dom0/domUs CAN really dynamically allocate memory to the domUs on demand? If so, is there any documentation I can read to config it properly? do I need to run any application in the domXs? Any help, any lead, any clue, will be greatly appreciated :))))) Thanks in advance Javier, a.a.t. -- "The Universe we observe has precisely the properties we should expect if there is, at bottom, no design, no purpouse, no evil, no good, nothing but blind, pitiless indiference." (Richard Dawkins) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier, Xen does not dynamically adjust the amount of memory a DomU has available. In the configuration you''ve mentioned the DomU''s will have 128 MB of RAM and you can manually adjust that up to 1024 MB of RAM using the "mem-set" command. I''m not sure if the commercial Xen products have any kind of dynamically memory allocation but I think the problem is in the DomU telling the Dom0 that it needs more memory. Does anyone on the list know if there is a hypercall to notify the Dom0 if a DomU is low on free memory? Ryan> Hi all, > > I''m trying to tune some memory parameters in my dom0 and domUs, and got > stuck. I''ve been googling, but can''t find something "straightforward" ;) > > I have a dom0 with 2GB RAM, and have 5 domUs in it, using Xen 3.1.0 > with > kernel 2.6.18, all installed through Debian packages. > > My dom0 is launched with > > xenhopt=dom0_mem=256MB > > in grub''s /boot/grub/menu.lst. > > I''ve created all my domUs with the following memory parameters: > > ---- > memory = ''128'' > maxmem = ''1024'' > shadow_memory = 8 > ---- > > My domUs have a swap partition, and I''ve setted the kernel''s swappiness > to 0. > > With this config, I understand that the domUs will be started with an > starting amount of 128 MB RAM, and they will grow the amount used > according to their needs and availability. Well. No. They begin swapping > :/ > > In one domU, that is using almost all the initial memory, when > disabling > the swap and launching another process, the OOM killer start killing > processes. > > I''ve read something about a "balloon driver" that should do the magic, > but it all refers to info prior to 2006. In a chat script someone said > that it is now handled with the "mem-set/mem-max" parameters. There was > also some other guy telling about /proc/xen/balloon, but couldn''t find any > detailed info on that either. > > By now, I''m suspicious that I''ve missunderstood the memory handling in > Xen :) > > Can you tell me if xen dom0/domUs CAN really dynamically allocate > memory > to the domUs on demand? If so, is there any documentation I can read to > config it properly? do I need to run any application in the domXs? > > Any help, any lead, any clue, will be greatly appreciated :))))) > > Thanks in advance > > Javier, a.a.t. > > -- > "The Universe we observe has precisely the properties we should > expect if there is, at bottom, no design, no purpouse, no evil, no > good, nothing but blind, pitiless indiference." > (Richard Dawkins) > > _______________________________________________ > 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 Tue, 30 Oct 2007, in a new attempt to enlighten us, Ryan Burke wrote: RB> Javier, RB> RB> Xen does not dynamically adjust the amount of memory a DomU has available. RB> In the configuration you''ve mentioned the DomU''s will have 128 MB of RAM RB> and you can manually adjust that up to 1024 MB of RAM using the "mem-set" RB> command. But then, what''s the use of setting a ''mem-max'' value? If you grow the domU memory manually, mem-max is... what? a sort of "preassure valve"? If you try to allocate more memory to the domU than "mem-max", it just caps you and give you an error? If this is the use, can anybody give me examples of WHEN and WHERE to use it, as I can''t figure them out? Regarding the "balloon driver": was it dropped? Some posts seems to state that, though I couldn''t find further info about this. And the values in /proc/xen/balloon? Can they be used with to create an script to allocate memory "sort of" automagically? Saludos Javier, a.a.t. -- "I had such a crush on her. Until I met you Lois, you''re my silver medal." (Peter Griffin, "Family Guy") _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Take a look at this: http://lists.xensource.com/archives/html/xen-users/2007-03/msg00654.html It seems to answer what he maxmem config parameter and xm max-mem command do. I haven''t played with the memory allocation of DomU''s. Personally I always though the balloon driver was the fact that you could allocate all the system''s RAM to the Dom0 then as you allocated to other DomU''s it would deflate Dom0''s memory accordingly. That way you are potentially getting use from all your RAM instead of locking Dom0 to a small slice when it could be using more for better performance. Of course there always seemed to be issues with people trying to squeeze Dom0 too small by not giving it a large enough "min-mem" setting. Ryan> On Tue, 30 Oct 2007, in a new attempt to enlighten us, Ryan Burke wrote: > > RB> Javier, > RB> > RB> Xen does not dynamically adjust the amount of memory a DomU has > available. > RB> In the configuration you''ve mentioned the DomU''s will have 128 MB of > RAM > RB> and you can manually adjust that up to 1024 MB of RAM using the > "mem-set" > RB> command. > > But then, what''s the use of setting a ''mem-max'' value? If you grow the > domU memory manually, mem-max is... what? a sort of "preassure valve"? If > you try to allocate more memory to the domU than "mem-max", it just > caps you and give you an error? > > If this is the use, can anybody give me examples of WHEN and WHERE to > use it, as I can''t figure them out? > > Regarding the "balloon driver": was it dropped? Some posts seems to > state that, though I couldn''t find further info about this. > > And the values in /proc/xen/balloon? Can they be used with to create an > script to allocate memory "sort of" automagically? > > Saludos > > Javier, a.a.t. > > -- > "I had such a crush on her. Until I met you Lois, you''re my silver > medal." > (Peter Griffin, "Family Guy") >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users