Web Hosting Talk







View Full Version : WHM and Swapfile usage


MadMax82
06-09-2001, 11:45 PM
Ok I am getting used to the CPanel/WHM system with a new server and everything has been going well for the last month. However, now when I check the system status in WHM I am showing an amber light for the swap file with the swap file showing .185%. Memory usage is around 64% with very light CPU usage at .02 or so. Based on what little I know does this mean the swap file is being used extensively and that I need more RAM or are there other more obvious things I need to be looking at? I am currently running 256K and was thinking about moving to 512K since we just added a couple of MySQL databases (FAQ and Customer Service). Ideas and suggestions?

webfors
06-10-2001, 12:42 AM
Adding ram will always help bring down your swapfile. How big is your swapfile anyway, and how much of it is being used?

MadMax82
06-10-2001, 07:57 AM
Here are my stats:

Current Memory Usage
total used free shared buffers cached
Mem: 256480 253048 3432 81820 40892 55428
-/+ buffers/cache: 156728 99752
Swap: 307400 250492 56908
Total: 563880 503540 60340

From this it appears my memory is maxed out and I am using a lot of the swap file. But when I use the control panel it says I am only using 61%of my memory and the CPU load is next to nothing. I am running two MySQL databases with PHP but the rest is just straight HTML. Does MySQL automatically use all the memory available on the machine?

Domenico
06-10-2001, 10:15 AM
Linux is very efficient with your RAM. If you get 512mb Linux wil use most of it but it will make your swapfile a bit smaller wich is allways a good thing...

Planet Z
06-10-2001, 03:54 PM
Wow. You're using over 80% of your Swap. If that's true, I'd go for a memory upgrade. Something's using up a LOT of memory. We try to keep our servers using less than 10% of the swap space (ideally, not using any). Using swap space isn't necessarily a bad thing per se. But the more swap space you're using the slower your access times will be (since you're basically using your harddrive as memory).

MadMax82
06-10-2001, 04:20 PM
The interesting part is that my server traffic has remained fairly constant with about 2.5 gig per day and uptil now the swap file was not being used all that much. The only difference in the past few days has been the addition of a MySQL database but that does not appear to be getting much use at the moment. Right now I am running 256meg and I am trying to upgrade to 512 ASAP but I am rather suprised this is taxing the server this much. Any other ideas?

JonnyQuags
06-10-2001, 06:06 PM
Its possible that a simple reboot would clear that up and bring the swap usage down to a much lower level.

MadMax82
06-10-2001, 07:52 PM
Ok perhaps I have been staring at computer screens a bit too long this weekend. Doh! of course things cleared up nicely after the reboot. Need more coffee!

Thanks Tcoy for pointing out what should have been the obvious to me!