Hi guys, First of all, sorry for my poor english. This is my first message at this list. I''m using Xen on several machines since last November. Right now I''m having a specific problems with 2 servers: both are losing the network on dom0 but all guest systems are still running fine. Looking at those dom0 logs I''ve discovered that sometimes linux kernel OOM-Killer tries to kill some important applications like sshd for e.g. Using ps, top, pmap and free commands I can see that dom0 will try to eat as much memory as there is available, but I can''t see all the process using this memory, even if I do sum the virtual memory size (VSZ) of each process, which is supposed to be as big as the total machine (dom0) memory AFAIK. For example, I have 4 AMD64 systems running Gentoo Linux with Xen 3.1.1 and linux sources 2.6.20-r6. Two of those machines have 512MB for dom0 and the others have 430MB. Those hypervisors are eating around 400MB to 500MB (from `free -m` ''used'' output) each one, and the only process I''m running on them are mdadm (for raid monitor) ntpd and sshd. If I sum those machines'' processes, I can see between 130 to 200 MB of VSZ, so where''s the memory not being used? If I do sum RSS (resident memory) plus SHR (shared memory) for all process I''ll get somethiing between 80MB to 120MB being used. On a test machine with only 128MB available to dom0 running the same processes I can see around 117MB in use. On other machines without Xen I can sum all process RSS plus SHR and I''ll get almost the same value from `free -m` output. My question is if the xen kernel part do try to allocate memory which I can''t see on ps/top utils or if I maybe have a problem with my machines setup? Another question is if it''s OK to just allocate 128MB to dom0? As I said the only machine with 128MB is a test machine which is not used this much. Thanks for any advice, Claudinei Matos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Claudinei Matos schrieb:> Hi guys,> My question is if the xen kernel part do try to allocate memory which I > can''t see on ps/top utils or if I maybe have a problem with my machines > setup? > Another question is if it''s OK to just allocate 128MB to dom0? As I said > the only machine with 128MB is a test machine which is not used this much.The dom0 memory shown by "free" has nothing to do with your physical ram. By default, dom0 gets all memory which is not used by domU''s. If you''re starting domU''s your dom0 memory will shrink until dom0_min_mem (see xm help, man xm ...). The same way your dom0 memory probably balloons out if you''re stopping domU''s. If you want a static ram size at dom0, you need to add dom0_mem, dom0_max_mem and/or dom0_min_mem parameters to your grub entry (after xenXXX.gz). _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stephan Seitz wrote:> Claudinei Matos schrieb: >> Hi guys, > > >> My question is if the xen kernel part do try to allocate memory which >> I can''t see on ps/top utils or if I maybe have a problem with my >> machines setup? >> Another question is if it''s OK to just allocate 128MB to dom0? As I >> said the only machine with 128MB is a test machine which is not used >> this much. > > The dom0 memory shown by "free" has nothing to do with your physical ram. > By default, dom0 gets all memory which is not used by domU''s. > If you''re starting domU''s your dom0 memory will shrink until dom0_min_mem > (see xm help, man xm ...). The same way your dom0 memory probably > balloons > out if you''re stopping domU''s. > If you want a static ram size at dom0, you need to add dom0_mem, > dom0_max_mem > and/or dom0_min_mem parameters to your grub entry (after xenXXX.gz). >I''m already using boot option "dom0_mem" to limit the physical ram usage on all my nodes as well as the xend-config.sxp "dom0_min_mem" parameter with the same value of "dom0_mem" boot option. I still in doubt about if xen kernel modules are using the free memory but not showing up its use at top and ps commands. For tests purpose I''ve realized that none of the xen visible process do care about the domU "life". I can kill some xen process and the domU still running (I did not tested with blktapctrl as I think it can give some problems with domU storage). So I wonder there''s some kernel land process (invisible to ps/top) which care about domU and who''s probably consuming some free memory. Is there an away to see such a process and/or even look at its memory usage? Thanks, Claudinei Matos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I think there''s no invisible process except for the balloon driver, by which you can use mem-set to change the domain''s memory allocation. Please correct me if I''m wrong. Thanks On Fri, Feb 22, 2008 at 8:40 AM, Claudinei Matos < claudineimatos@hospedevip.com.br> wrote:> Stephan Seitz wrote: > > Claudinei Matos schrieb: > >> Hi guys, > > > > > >> My question is if the xen kernel part do try to allocate memory which > >> I can''t see on ps/top utils or if I maybe have a problem with my > >> machines setup? > >> Another question is if it''s OK to just allocate 128MB to dom0? As I > >> said the only machine with 128MB is a test machine which is not used > >> this much. > > > > The dom0 memory shown by "free" has nothing to do with your physical > ram. > > By default, dom0 gets all memory which is not used by domU''s. > > If you''re starting domU''s your dom0 memory will shrink until > dom0_min_mem > > (see xm help, man xm ...). The same way your dom0 memory probably > > balloons > > out if you''re stopping domU''s. > > If you want a static ram size at dom0, you need to add dom0_mem, > > dom0_max_mem > > and/or dom0_min_mem parameters to your grub entry (after xenXXX.gz). > > > I''m already using boot option "dom0_mem" to limit the physical ram usage > on all my nodes as well as the xend-config.sxp "dom0_min_mem" parameter > with the same value of "dom0_mem" boot option. > > I still in doubt about if xen kernel modules are using the free memory > but not showing up its use at top and ps commands. > > For tests purpose I''ve realized that none of the xen visible process do > care about the domU "life". I can kill some xen process and the domU > still running (I did not tested with blktapctrl as I think it can give > some problems with domU storage). So I wonder there''s some kernel land > process (invisible to ps/top) which care about domU and who''s probably > consuming some free memory. Is there an away to see such a process > and/or even look at its memory usage? > > > > Thanks, > > Claudinei Matos > > _______________________________________________ > 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
So i think, too. The memory used by domU''s is managed by dom0, but allocation takes place via the hypervisor. You can see memory usage via xm command (e.g. xm top or xm list). weiming schrieb:> I think there''s no invisible process except for the balloon driver, by > which you can use mem-set to change the domain''s memory allocation. > > Please correct me if I''m wrong. > > Thanks > > On Fri, Feb 22, 2008 at 8:40 AM, Claudinei Matos > <claudineimatos@hospedevip.com.br > <mailto:claudineimatos@hospedevip.com.br>> wrote: > > Stephan Seitz wrote: > > Claudinei Matos schrieb: > >> Hi guys, > > > > > >> My question is if the xen kernel part do try to allocate memory > which > >> I can''t see on ps/top utils or if I maybe have a problem with my > >> machines setup? > >> Another question is if it''s OK to just allocate 128MB to dom0? As I > >> said the only machine with 128MB is a test machine which is not used > >> this much. > > > > The dom0 memory shown by "free" has nothing to do with your > physical ram. > > By default, dom0 gets all memory which is not used by domU''s. > > If you''re starting domU''s your dom0 memory will shrink until > dom0_min_mem > > (see xm help, man xm ...). The same way your dom0 memory probably > > balloons > > out if you''re stopping domU''s. > > If you want a static ram size at dom0, you need to add dom0_mem, > > dom0_max_mem > > and/or dom0_min_mem parameters to your grub entry (after xenXXX.gz). > > > I''m already using boot option "dom0_mem" to limit the physical ram usage > on all my nodes as well as the xend-config.sxp "dom0_min_mem" parameter > with the same value of "dom0_mem" boot option. > > I still in doubt about if xen kernel modules are using the free memory > but not showing up its use at top and ps commands. > > For tests purpose I''ve realized that none of the xen visible process do > care about the domU "life". I can kill some xen process and the domU > still running (I did not tested with blktapctrl as I think it can give > some problems with domU storage). So I wonder there''s some kernel land > process (invisible to ps/top) which care about domU and who''s probably > consuming some free memory. Is there an away to see such a process > and/or even look at its memory usage? > > > > Thanks, > > Claudinei Matos > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com <mailto: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-- Stephan Seitz Senior System Administrator *netz-haut* e.K. multimediale kommunikation zweierweg 22 97074 würzburg fon: +49 931 2876247 fax: +49 931 2876248 web: www.netz-haut.de <http://www.netz-haut.de/> registriergericht: amtsgericht würzburg, hra 5054 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users