Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    38

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

    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

  2. #2
    Member
    Join Date
    Sep 2010
    Posts
    38

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

    up up


    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





    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






    my temporary analyze the high load is because the Swap Used, so i want to try disable it, let me know if you have another suggestions
    Last edited by basketmen; 01-22-2011 at 03:15 PM.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,931

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

    that's not a high load and that's not very much swap being used
    some programs inherently use swap
    Lowest Host/Empire Technology LLC
    Affordable hosting solutions http://empire-hosting.net
    List Your hosting site FREE in http://hostgeneration.com

  4. #4
    Support Manager cPanelEric's Avatar
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    488
    cPanel/Enkompass Access Level

    Root Administrator

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

    If you'd like to turn swap off you can using the command...

    swap off

    but judging from your screenshots you're not in a bad way. If your cpu idle is at 0% and your IO wait aka "wa" is at 90% that's when you have swap issues.

  5. #5
    Member
    Join Date
    Sep 2010
    Posts
    38

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

    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 :





    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)






    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?

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

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

    Hello,

    The load is probably high due to the high CPU and memory for the mobelof user, likely from MySQL usage. The swap isn't the issue here. You'll need to check top every time the load is elevated to see if it's the same user. You can also check WHM > Daily Process Logs to see the average usage by that user for CPU, memory and MySQL.

    You might also want to check "mysqladmin proc" to see what MySQL processes that user is likely running during those times. Since that user has multiple PHP processes with high CPU running, it's a sure bet that's the user peaking the load.

    You can run an lsof on the PID number of that mobelof user's processes when they show these high usage processes to see what it is running:

    Code:
    lsof -p PID#
    Simply replace PID# with the PID# of the process, which is the one to the far left in top.

    You can ps aux to get all that user's processes at the time to get a listing of PID numbers:

    Code:
    ps aux | grep mobelof
    Thanks!
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. SWAP high all day 95%
    By postcd in forum Optimization
    Replies: 15
    Last Post: 08-24-2011, 01:15 PM
  2. swap memory is not used on the server
    By its_joe in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-24-2007, 05:40 AM
  3. server is not using the swap space, help!
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-15-2005, 03:26 AM
  4. Linux OS - Swap partition placement
    By tseabaugh in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-07-2005, 04:02 AM
  5. Help! new server swap not in use
    By promak in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-13-2003, 12:09 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube