Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linux memory eat out 2

Status
Not open for further replies.

greenpee

Programmer
Joined
Aug 3, 2004
Messages
39
Location
US
Hi, I have linux box running sendmail and cyrus. I have 1G RAM but it gets filled up in 24 Hours. When I run top, I didn't see any big process, nothing over 10,000. Could you help me to find which process is taking all the RAM and also, is there a way in Linux I can "flush" out the memory instead of reboot my computer? Thanks
 
linux memory management is a deceptive thing.
You'll find using the "free" command that a sizeable amount of the RAM becomes used for caching when it isn't allocated to applications. This is a performance enhancing function and doesn't affect your applications.

Linux will automatically throw away parts of the cache RAM to allocate to the application RAM.

You should monitor number of applications and any zombies running with "ps ax". If you see strangeness there, then you're actually consuming RAM with applications.

 
When linux has free memory it uses it to cache files to speed up subsequent reads.

Check out "free" to see what I'm talking about:

Code:
foxtrot(~)$ free
             total       used       free     shared    buffers     cached
Mem:        644052     633116      10936          0     142184     233636
-/+ buffers/cache:     257296     386756
Swap:       530096     184324     345772

Unless free and buffers both go to zero, you're fine.
 
Thanks experts. This is my free |.
total used free shared buffers cached
Mem: 1030920 1014220 16700 0 318772 602920
-/+ buffers/cache: 92528 938392
Swap: 1024056 5288 1018768

I could not see any strange process in ps aux. 40 sendmails and 20 lmtpd. the machine always run out of memory and froze during weekend no matter what I do(reboot machine on Friday and clean up mqueue). Could you give me suggestion how can I prevent it?

 

The 'cached' is essentially free. If it is needed it will be used.

Your lockups could be caused by an errant process, bad memory or other bad hardware, but probably not running out of memory.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top