dgreen@CLEMSON.EDU
2006-Sep-03 17:32 UTC
[Xen-users] domUs high memory usage (FC5 -- Xen 3.0.2)
Situation: I start up my domU''s (in a console) and they seem to run at ~75MB (out of 256MB) of memory. The only thing I have done on the VMs is to use ping to test RTT''s. I come back to the VM''s the next day and notice that all of them are running ~256MB. I haven''t started any other services. My environment: dom0 -- FC5 (2.6.17-1.2157_FC5xen0, using 512MB RAM) domUs -- FC5 (2.6.17-1.2157_FC5xen0, using 256MB RAM) domUs HD -- 5GB, only 42% used domU ''top'' output: top - 13:35:58 up 3 days, 1:02, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 49 total, 1 running, 48 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si Mem: 262284k total, 258704k used, 3580k free, 67520k buffers Swap: 524280k total, 0k used, 524280k free, 127740k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 886 root 16 0 25464 604 420 S 0.0 0.2 0:00.00 hpiod 891 root 15 0 11856 5064 1160 S 0.0 1.9 0:00.11 python 18360 root 16 0 9040 2700 1760 S 0.0 1.0 0:00.04 cupsd 997 root 16 0 8324 2108 1032 S 0.0 0.8 0:00.07 sendmail 1005 smmsp 16 0 7368 1696 856 S 0.0 0.6 0:00.00 sendmail 1028 root 16 0 5192 1124 576 S 0.0 0.4 0:00.00 crond 979 root 16 0 4980 1104 784 S 0.0 0.4 0:00.00 sshd 701 root 15 0 4740 596 316 S 0.0 0.2 0:00.00 rpc.idmapd 1134 root 15 0 4464 1452 1224 S 0.0 0.6 0:00.00 bash 1113 haldaemo 15 0 4392 2632 1684 S 0.0 1.0 0:00.03 hald 1059 xfs 16 0 3660 1572 756 S 0.0 0.6 0:00.00 xfs 1114 root 24 0 3148 1016 908 S 0.0 0.4 0:00.00 hald-runner 1103 root 25 0 3144 1184 1064 S 0.0 0.5 0:00.00 cups-config-dae 715 dbus 15 0 3072 964 776 S 0.0 0.4 0:00.00 dbus-daemon 1093 avahi 15 0 2816 1448 1272 S 0.0 0.6 0:00.00 avahi-daemon 1094 avahi 25 0 2816 324 184 S 0.0 0.1 0:00.00 avahi-daemon 1126 root 17 0 2744 1180 920 S 0.0 0.4 0:00.00 login Questions: 1) Any recommendations of services to check? 2) What other commands could help diagnose this? ''ps''? 3) Has anyone noticed if any services are getting started and never freed up when finished? 4) Could dom0 be the culprit? Thanks in advance for any help. Vince _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans de Hartog
2006-Sep-03 17:54 UTC
Re: [Xen-users] domUs high memory usage (FC5 -- Xen 3.0.2)
dgreen@CLEMSON.EDU wrote:> Situation: > > I start up my domU''s (in a console) and they seem to run at ~75MB (out of > 256MB) of memory. The only thing I have done on the VMs is to use ping to > test RTT''s. I come back to the VM''s the next day and notice that all of > them are running ~256MB. I haven''t started any other services. >Hello Vince, That''s a unix filosofy: free memory is a waiste. Therefore, whatever the memory is used for (buffers, cache, programs) is not freed if not necessary to do other things. So eventually most of the memory is in use because if you need something you used before, it is faster if it is still in memory than to read it from disk again. Regards, Hans. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
dgreen@CLEMSON.EDU
2006-Sep-03 18:26 UTC
Re: [Xen-users] domUs high memory usage (FC5 -- Xen 3.0.2)
Thanks for your response Hans. I have only used the ping command and nothing more. Are there other services in the background that are starting and grabbing this memory? I have used Solaris, FC5, SuSE without Xen and never noticed this hogging of all the memory for such a period of time. So, you''re saying that each time I do a top on a VM I will see ''Mem: 262284k total, 256996k used'' and that this is normal? Vince>> Situation: >> >> I start up my domU''s (in a console) and they seem to run at ~75MB (out >> of >> 256MB) of memory. The only thing I have done on the VMs is to use ping >> to >> test RTT''s. I come back to the VM''s the next day and notice that all of >> them are running ~256MB. I haven''t started any other services. >> > > Hello Vince, > > That''s a unix filosofy: free memory is a waiste. Therefore, whatever > the memory is used for (buffers, cache, programs) is not freed if > not necessary to do other things. So eventually most of the memory > is in use because if you need something you used before, it is faster > if it is still in memory than to read it from disk again. > > Regards, > Hans. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans de Hartog
2006-Sep-03 18:54 UTC
Re: [Xen-users] domUs high memory usage (FC5 -- Xen 3.0.2)
Hi Vince, Yes, I think it is normal. If your system runs for a day, think of all the things that happen: your cronjobs (hourly, daily), cron itself, all the kernel helper daemons and things like sshd, ntpd, journaling, and so on). Look at ps -ef and see what is running. From all those things, the last used are still in memory and stay there until something else needs memory. Please let somebody correct me if I''m wrong but if a unix system has a lot of free memory, then - it just booted, or - has too much memory, or - memory allocation is not optimal (IMHO) Regards, Hans. dgreen@CLEMSON.EDU wrote:> Thanks for your response Hans. > > I have only used the ping command and nothing more. Are there other > services in the background that are starting and grabbing this memory? I > have used Solaris, FC5, SuSE without Xen and never noticed this hogging of > all the memory for such a period of time. So, you''re saying that each > time I do a top on a VM I will see ''Mem: 262284k total, 256996k used'' and > that this is normal? > > Vince > > >>>Situation: >>> >>>I start up my domU''s (in a console) and they seem to run at ~75MB (out >>>of >>>256MB) of memory. The only thing I have done on the VMs is to use ping >>>to >>>test RTT''s. I come back to the VM''s the next day and notice that all of >>>them are running ~256MB. I haven''t started any other services. >>> >> >>Hello Vince, >> >>That''s a unix filosofy: free memory is a waiste. Therefore, whatever >>the memory is used for (buffers, cache, programs) is not freed if >>not necessary to do other things. So eventually most of the memory >>is in use because if you need something you used before, it is faster >>if it is still in memory than to read it from disk again. >> >>Regards, >>Hans. >> > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra
2006-Sep-03 23:56 UTC
Re: [Xen-users] domUs high memory usage (FC5 -- Xen 3.0.2)
On Sunday 03 September 2006 1:26 pm, dgreen@clemson.edu wrote:> all the memory for such a period of time. So, you''re saying that each > time I do a top on a VM I will see ''Mem: 262284k total, 256996k used'' and > that this is normal?to get a feel of memory usage, top isn''t too appropriate, better use ''free''. it will show three lines: mem, -/+ buffers, and swap. the first one is the same that top shows: total, used, free, shared, buffers and cached. the last one is for virtual mem, but the second one (-/+ buffers) is more interesting; it simply adds the ''freeable'' ram (buffers+cached) to the ''free'' column, and substracts it from the ''used'' column. so it shows the really committed memory. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users