Server runs out of RAM quickly but nothing unusual happening.

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
200MB left after only one hour...

Mem: 4150292k total, 3929236k used, 221056k free, 281184k buffers
Swap: 2031608k total, 0k used, 2031608k free, 3204376k cached

Been having some problems with this server running out of memory. There are no unusal processes running, nothing showing up in the logs. I've been monitoring the server all day and over a few hours it slowly runs out of memory - it starts swapping like mad and falls over.

I've been running top and watching it with the highest memory usage at the top. There is no single process using a large amount of memory. I've compared this server to other servers and the performance of this is better than some - except they tend to stay with around 900MB available and can run like that for months. This one doesnt seem to be getting anything back once it has been used.

As I type this, the server has around 100MB remaining and I know it will soon fall over if I dont reboot it. As mentioned - there are no unusual processes running and all the normal ones are within the usual ranges of memory and CPU usage I'd expect to see. No process is using any more than 0.3 % of memory.

Could this be faulty RAM? The server has been fine for over a year but in the last two days it has fallen over 4 times.

Any ideas?
 

Voltar

Well-Known Member
Apr 30, 2007
267
0
168
Bakersfield, California
Unix and Unix like OSs, (Linux included) manage memory differently that what you may be used to in say, Windows. There might only be a small amount of memory being used for the kernel and all the running applications, and the rest is used as a cache/buffer.

As long as you don't start seeing substantial swap usage (you have none right now it seems) you should be fine.

Edit: This may help a bit too.
 

Amit Deshmukh

Well-Known Member
Jul 1, 2007
83
0
56
Memory Usage ?

Please provide your phpinfo.php file Url. It looks like memory leak issue.

Regards
 

pjman

Well-Known Member
Mar 22, 2003
101
0
166
New York
Might be Bad Ram...

I had that happen to me a few years back. I had the DataCenter swap out the Ram and we were good to go.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
30
473
Go on, have a guess
As Voltar says, that's how it should look. The majority of the memory usage should be cached for best performance. So long as you're not sesing high swapfile usage there's probably no problem at all.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
931
21
168
Hi Chirpy, thanks for your input. The server was showing very high swapfile usage and crashing with out of memory errors two or three times a day.

After re-installing almost everything I could think of and running a full file system check, the problem stopped. I put it down to a software-induced memory leak caused by some unknown circumstance. Possibly some minor disk corruption was a contributing factor.

All ok again... for now...

Thanks for your input guys :)