On a linux server (Ubuntu Lucid), my used swap keeps growing by the hour on a server, and I'm having a hard time identifying which process is growing in swap.
The usual way I do this is to let the system run until the swap utilization is evidently higher than it "should" be. Once you can see the problem run top, sort by Virtual Memory Size (sometimes just called Size, or VIRT on Linux -- The guy with the largest difference between VM Size and Resident size (RES) is usually your culprit.
The best way to know for sure is to make sure it's safe and then kill the process - If your swap suddenly frees up you found your leak.
The usual way I do this is to let the system run until the swap utilization is evidently higher than it "should" be. Once you can see the problem run
top
, sort by Virtual Memory Size (sometimes just calledSize
, orVIRT
on Linux -- The guy with the largest difference between VM Size and Resident size (RES
) is usually your culprit.The best way to know for sure is to make sure it's safe and then kill the process - If your swap suddenly frees up you found your leak.
https://stackoverflow.com/questions/131303/linux-how-to-measure-actual-memory-usage-of-an-application-or-process
Should help you out. :)
Have you tried running
top
and pressingM
to sort all processes by memory usage?