Linux – How to Diagnose System Swapping Issues

linuxswap

I have an ubuntu vps running that has about 300MB of memory, of which only 20% or less is free right now …
My question is, how can I figure out what particular program I'm running that is causing it to swap so much?

Best Answer

To find out the amount of swap space used by every process, run top (not htop), press 'f' to select columns (f for fields) to display, press 'p' to add swap to display, press 'o' to sort the table (o for order by) and press 'p' again to order by swap usage.