Knowledgebase

how can i identify what is using my swap memory?

Posted by wiredhosting, 04-19-2009, 01:52 PM
Hi guys, i wanted to know if there is any specific way (maybe logs) to see what is using the swap memory of a dedicated server.. its a server with 8GB ram.. it has 60% of memory used, and a constant swap memory usage of 30%.. i thought that in normal conditions swap memory was not used.. its a centos / cPanel/WHM based server Thanks

Posted by Dr_Michael, 04-19-2009, 01:57 PM
Is this from your cpanel or from your telnet TOP command?

Posted by AquariusStorage, 04-19-2009, 01:57 PM
Hey If you're only using 60% of your actual memory, but it is displaying you are using swap, the issue is that probably at one point or another, your memory usage jumped to 100% and your server started using swap. To clear this, you just need to simply restart the machine. It's not a big deal actually, as it's not probably actually "swapping" since a machine will only use swap if it is out of memory. It is just reporting that it is. I'd say just wait for your next reboot, and then it will be gone. I'd also recommend installing something that will notify you when your memory usage goes above a particular point. That way you can see what the problem is as it is occurring and that way this does not happen again. It will allow you to put a stop to it before it gets out of hand.

Posted by wiredhosting, 04-19-2009, 02:02 PM
the thing is that the swap usage is not stable.. it goes from 20% to 30% so i guess that there is something running on backend using swap memory.. such as email script or something strange.. maybe there was a log or way to see what was using swap memory.

Posted by UNIXy, 04-19-2009, 02:18 PM
To find out how much a particular process is using of swap space, start top and when it loads, type the letter 'f', wait a second or two then type the letter 'p', hit enter. To order your list of processes by their use of swap, enter the letter 'F', then 'p', finally hit the enter key and then the letter 'W'. All letters are case sensitive. Best

Posted by AquariusStorage, 04-19-2009, 02:30 PM
My recommendation was because you said the swap usage was at a constant 30% which would leave me to believe that it is in fact not swapping. If it is not constant, aka not stable at 30%, then that can defiantly mean it is using swap.

Posted by RBBOT, 04-19-2009, 02:34 PM
Only press W if you want to save that as a default setup. You may want to turn on the page faults column too which will show those processes where swapping is happening rather than long-term swap usage.

Posted by Dr_Michael, 04-19-2009, 02:36 PM
Do you run SMF in your server? If yes, I have a script which can shows useful stats. Check it here: www.dpgr.gr/status.php



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
ServerTag review (Views: 596)


Language:

Client Login

Email

Password

Remember Me

Search