Knowledgebase

[Linux/WHM] How to disable Swap Used? My server sometime get high load when Swap Used

Posted by basketmen, 01-21-2011, 10:07 PM
My server load normally only about 1 or below, the server running normally for days, not get high load when i check in whm >> Service Status, the Swap Used report always zero (0), not used at all : Swap Used 0.00% (0 of 10169104) but when Swap Used sometime, even the swap used very very small size, only 4k, or 88k like below, the server start sometime get high load, can be few times a day. And to make the Swap Used zero (0) again, i need to Gracefull Reboot in whm - Service Status : Swap Used 0.00% (4 of 10169104) or Swap Used 0.00% (88 of 10169104) the Memory Used when Swap Used is only about 25-50%, i believe the memory 8Gb is still big, the problem maybe because the harddrive/harddisk rpm are too slow please help guys How to disable the Swap Used? so the server only using the memory, not swapped using harddrive/harddisk too Nb. Here are the server specs : Core i7 860 Quad Core - SINGLE CPU QUAD CORE 2.8GHZ FSB 2.5 GT/s (8MB CACHE) w/HT Control Panel: CPanel/WHM - Centos 5 64 Bit RAM/Memory: 8GB DDR3 Primary Hard Drive: 1TB SATA

Posted by langitbiru, 01-21-2011, 10:55 PM
Hi, I think the high load is not because the swap usage. You can set the swappines to 0 :/proc/sys/vm/swappiness Or you can disable/unmount the swap partition

Posted by basketmen, 01-22-2011, 05:06 PM
but usually there are no high load, when Swap Used are 0 (zero), for few days screenshot when Swap Used are 0 (zero), there will be no high load http://i291.photobucket.com/albums/l...d23january.jpg the high load only come when Swap Used, and i need to Gracefull reboot to make the Swap Used 0 (zero) again screenshot when Swap Used are not 0 (zero), there will be high load (load can be 20-100) in that day for few minutes/hours, in this screenshot still normal load http://i291.photobucket.com/albums/l...djanuary22.jpg let me know if you or anyone have another suggestions Last edited by basketmen; 01-22-2011 at 05:14 PM.

Posted by Hostify Networks, 01-22-2011, 10:36 PM
I think you're looking in the wrong direction. Looks like IO wait is your problem (you are only using 88KB of swap which is basically nothing).

Posted by basketmen, 01-23-2011, 12:12 AM
ok what is IO wait, and what should i do?

Posted by basketmen, 01-24-2011, 05:57 PM
the high load since few days ago come when off peak time, not peak time, usually at 7-8am (very little people at that time, almost no traffic), you can see here, this is when high load at 8.23am, and the task are very low, only 198, get high load, the Swap used are 8k : http://i291.photobucket.com/albums/l...askonly198.jpg its not make sense get high load with the task only 198 (very little people at that time, almost no traffic), its very low number, its should be no high load, the server usually running the task at 250 averages and not get high load, if swap used are 0 (zero) This is current top result, now are peak time, the task are higher : 257, but the load only 0.61, the Swap used are 0 (zero) http://i291.photobucket.com/albums/l...d24january.jpg i am not sure if upgrading the memory from 8Gb right now, to 16Gb will solved the problem if you have suggestion again for now i really appreciated, maybe like how to set only use swap if memory used 90% or more?, or how to found out which one the script that causing high load?

Posted by Hostify Networks, 01-24-2011, 06:17 PM
Once again, swap usage is not your problem (since you are using virtually none...0%). The problem is slow disk(s). You'll note that in your first picture webalizer is running. It is very disk intensive. Note the "WA" value which is IO wait. If you don't use webalizer, disable it (or disable some of its functions and/or change the time it runs). You may also wish to move mysql to another disk to breathe a bit more life into the server. Another solution is to change your disk infrastructure to something like RAID 10 to increase your available IOPS.

Posted by langitbiru, 01-25-2011, 01:28 AM
Yes, there is no connection between very_very_small swap usage with high load. If you insist, good luck with your swap-load problem. The problem must be on another area

Posted by mcewanw, 06-01-2011, 11:58 PM
Slow hard disk compared to RAM is of course the problem when swap is occurring. However, the issue being noted by the original poster is that swap is occurring unnecessarily, when plenty of RAM is available (so slow hard disk issues shouldn't be coming into play). I've noticed the same effect in an old low powered (500MHz) low-RAM (256 MB) laptop actually! Not much of RAM to start with here, but even when that is only half used (or even less) swapping occasionally occurs and then the system become much slower in use. echo 0 > /proc/sys/vm/swappiness doesn't make much if any difference to that regularly observed effect. What does bring the old machine back up to speed is to: swapoff ...; sync; and then: swapon... again. Which clears the swap used of course. But soon it starts to swap again (even though RAM not heavily used) and the machines begins to crawl once more. I agree with the first poster therefore: the real issue is the swap algorithm. It shouldn't be swapping unnecessarily before a reasonably large percentage of available RAM is used up, but it does... regardless of swappiness setting... I haven't come across any tuning mechanism out of that, so it seems like a kernel programming/development issue to me...

Posted by cheaphosteu, 06-03-2011, 04:19 AM
swapon -s to show swap partitions swapoff /dev/sd... to turnoff swap.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Sago Networks Down (Views: 597)
JodoHost Down or Gone? (Views: 596)


Language:

Client Login

Email

Password

Remember Me

Search