Hi boy. I have to ask you a question about memory management in Xen. I have this situation: a server with 16Gb of Ram and 9 xen virtual machine. In this moment the sum of memory allocated from all virtual machines is 12Gb but the free memory for the dom0 is only 1Gb. And if I stop any other vm the free memory doesn''t change. There''s a way to set the memory free for the dom0 when I stop a virtual machine? Thanx in advance Daniele Piaggesi -- Daniele Piaggesi Linux System Administrator -------------------------- (Pro-Netics) S.p.A. Sourcesense - making sense of OpenSource http://www.pronetics.it Via E. L. Cerva 127/C 00142 Roma - Italy Tel (+39) 0651530849 Mob (+39) 3286176226 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Jan 18, 2008 12:35 PM, Daniele Piaggesi <d.piaggesi@pronetics.it> wrote:> Hi boy. > > I have to ask you a question about memory management in Xen. > > I have this situation: a server with 16Gb of Ram and 9 xen virtual > machine. In this moment the sum of memory allocated from all virtual > machines is 12Gb but the free memory for the dom0 is only 1Gb. > And if I stop any other vm the free memory doesn''t change. > > There''s a way to set the memory free for the dom0 when I stop a virtual > machine?dom0 is given a certain max amount of memory at boot, if my understanding is correct. You should look into the dom0_mem Xen boot option to adjust this. http://tx.downloads.xensource.com/downloads/docs/user/#SECTION04130000000000000000 It seems that dom0 could then reclaim up to that (dom0_mem) maximum amount of memory freed by VMs. Regards, Todd> > Thanx in advance > > Daniele Piaggesi > > > -- > Daniele Piaggesi > Linux System Administrator > -------------------------- > (Pro-Netics) S.p.A. > Sourcesense - making sense of OpenSource > http://www.pronetics.it > Via E. L. Cerva 127/C > 00142 Roma - Italy > Tel (+39) 0651530849 > Mob (+39) 3286176226 > > _______________________________________________ > 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
Todd Deshane wrote:> You should look into the dom0_mem Xen boot option to adjust this. > http://tx.downloads.xensource.com/downloads/docs/user/#SECTION04130000000000000000 > > It seems that dom0 could then reclaim up to that (dom0_mem) maximum > amount of memory freed by VMs.First of all thanks for help. Anyway I think that my problem should be a bit different. I notice that if I have a physical machine with (for example) 4Gb of Ram, and I start 3 virtual machine each one with 1Gb of Ram, the dom0 results to have the remaining free memory, that is 1Gb. So far so good. But if I stop one virtual machine (then the virtual machines used memory decrease to only 2Gb), dom0 still results to have only 1Gb. Then I think: Where is the giga released? And above all: why the memory released don''t increase automatically, the dom0 memory (that is the physical host memory)? Is there a way to adjust this? I don''t know if my analysis is correct or if there''s another way, or I''m doing something wrong, ''cause I''m not very expert about Xen, but I would to release to dom0, the memory previously used for one vm now stopped. Thanks :) Daniele -- Daniele Piaggesi Linux System Administrator -------------------------- (Pro-Netics) S.p.A. Sourcesense - making sense of OpenSource http://www.pronetics.it Via E. L. Cerva 127/C 00142 Roma - Italy Tel (+39) 0651530849 Mob (+39) 3286176226 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Well... Let''s suppose you give the 1GB of memory the VM was consuming back to the dom0. It starts it and filling it up. What do you think will happen if you want to start the VM again? He will tell you he doesn''t has enough free memory to boot your VM. I think Xen doens''t have something like ballooning (it starts a dummy process which comsumes lots of memory to make the machine put his own processes into swap to free the physical memory to launch the VM). That''s why it is best to put the dom0_mem parameter in the kernel line... Greetings, Jeroen -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Daniele Piaggesi Sent: maandag 21 januari 2008 14:24 To: deshantm@gmail.com Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Set memory free after shutdown Todd Deshane wrote:> You should look into the dom0_mem Xen boot option to adjust this. >http://tx.downloads.xensource.com/downloads/docs/user/#SECTION041300000000 00000000> > It seems that dom0 could then reclaim up to that (dom0_mem) maximum > amount of memory freed by VMs.First of all thanks for help. Anyway I think that my problem should be a bit different. I notice that if I have a physical machine with (for example) 4Gb of Ram, and I start 3 virtual machine each one with 1Gb of Ram, the dom0 results to have the remaining free memory, that is 1Gb. So far so good. But if I stop one virtual machine (then the virtual machines used memory decrease to only 2Gb), dom0 still results to have only 1Gb. Then I think: Where is the giga released? And above all: why the memory released don''t increase automatically, the dom0 memory (that is the physical host memory)? Is there a way to adjust this? I don''t know if my analysis is correct or if there''s another way, or I''m doing something wrong, ''cause I''m not very expert about Xen, but I would to release to dom0, the memory previously used for one vm now stopped. Thanks :) Daniele -- Daniele Piaggesi Linux System Administrator -------------------------- (Pro-Netics) S.p.A. Sourcesense - making sense of OpenSource http://www.pronetics.it Via E. L. Cerva 127/C 00142 Roma - Italy Tel (+39) 0651530849 Mob (+39) 3286176226 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users !DSPAM:87,47949d08307143761620701! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
xen-users-bounces@lists.xensource.com a écrit sur 21/01/2008 15:30:31 :> Well... Let''s suppose you give the 1GB of memory the VM was consumingback> to the dom0. It starts it and filling it up. What do you think willhappen> if you want to start the VM again? He will tell you he doesn''t hasenough> free memory to boot your VM. I think Xen doens''t have something like > ballooning (it starts a dummy process which comsumes lots of memory to > make the machine put his own processes into swap to free the physical > memory to launch the VM). That''s why it is best to put the dom0_mem > parameter in the kernel line...Reading the documentation, Xen does have ballooning. Without the dom0_mem parameter, the dom0 uses all available memory, then it "balloons out" enough memory for each created domU, until it reaches the minimum amount of memory for itself, defined in the "dom0-min-mem" parameter of the xend-config.sxp file. In this case, it refuses to ceate the domU. Nowhere the documentation talks about a "balloon in" of the memory when a domU is stopped. IMHO, this behavior is understandable. If you really want to release to the dom0 the memory used by the stopped domU, try to do this manually by: xm mem-set 0 2G Greetings, Alain> > Greetings, > Jeroen > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Daniele > Piaggesi > Sent: maandag 21 januari 2008 14:24 > To: deshantm@gmail.com > Cc: xen-users@lists.xensource.com > Subject: Re: [Xen-users] Set memory free after shutdown > > > > Todd Deshane wrote: > > You should look into the dom0_mem Xen boot option to adjust this. > > >http://tx.downloads.xensource.com/downloads/docs/user/#SECTION041300000000> 00000000 > > > > It seems that dom0 could then reclaim up to that (dom0_mem) maximum > > amount of memory freed by VMs. > > First of all thanks for help. Anyway I think that my problem should be a> bit different. I notice that if I have a physical machine with (for > example) 4Gb of Ram, and I start 3 virtual machine each one with 1Gb of > Ram, the dom0 results to have the remaining free memory, that is 1Gb. So> far so good. But if I stop one virtual machine (then the virtual > machines used memory decrease to only 2Gb), dom0 still results to have > only 1Gb. Then I think: Where is the giga released? And above all: why > the memory released don''t increase automatically, the dom0 memory (that > is the physical host memory)? Is there a way to adjust this? > > I don''t know if my analysis is correct or if there''s another way, or I''m> doing something wrong, ''cause I''m not very expert about Xen, but I would> to release to dom0, the memory previously used for one vm now stopped. > > Thanks :) > Daniele > > -- > Daniele Piaggesi > Linux System Administrator > -------------------------- > (Pro-Netics) S.p.A. > Sourcesense - making sense of OpenSource > http://www.pronetics.it > Via E. L. Cerva 127/C > 00142 Roma - Italy > Tel (+39) 0651530849 > Mob (+39) 3286176226 > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > !DSPAM:87,47949d08307143761620701! > > > > > _______________________________________________ > 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
Daniele Piaggesi
2008-Jan-21 15:27 UTC
Re: [Xen-users] Set memory free after shutdown [SOLVED]
Alain BARTHE wrote:> If you really want to release to the dom0 the memory used by the stopped > domU, try to do this manually by: > xm mem-set 0 2GRight! It''s exactly what I want to know! I just tried it with success. Really Thanks daniele -- Daniele Piaggesi Linux System Administrator -------------------------- (Pro-Netics) S.p.A. Sourcesense - making sense of OpenSource http://www.pronetics.it Via E. L. Cerva 127/C 00142 Roma - Italy Tel (+39) 0651530849 Mob (+39) 3286176226 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users