LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Swap spike (https://www.linuxquestions.org/questions/linux-server-73/swap-spike-944018/)

digitaldude 05-09-2012 03:47 AM

Swap spike
 
Hello,

I have a centos 5.5 web app server which has its swap graph rise to 100% in a very short time interval... usually less than 30-40 seconds. This halts the machine and all I can do is reboot it. I have a periodical memory clean script that flushes the memory upon swap being over 20% which works well. But in cases when the swap rises sharply, the script doesn't get enough time to finish execution and hence server halts. What could be the solution to this?

chrism01 05-09-2012 09:06 PM

You need to know what progs you are running; one (at least) has a major memory leak, assuming you have a reasonable amt of swap(!).
Maybe the machine is just under-specced..
You need to run top and check the logs to see what's causing it.

digitaldude 05-10-2012 12:32 AM

How do I detect memory leaks? top and htop don't show anything out of the ordinary. Its just once in a month maybe that the server instantly becomes un responsive and when it is rebooted, I can see a spike on the swap graph.
Its a 4GB machine with 8GB swap.
Is there any specific tool that could investigate the memory leaks issue?


All times are GMT -5. The time now is 03:39 AM.