Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SWAP high all day 95%

Discussion in 'Workarounds and Optimization' started by postcd, Jul 22, 2011.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Hi, I have average load 1-6 (8) sites running ok up to 12 (8) load. Maximum 35% Ram used, but recently Swap is very high all day
    /http://s2.postimage.org/3y667dxsp/highswap.jpg

    Memory free in console is like 700-200Mb. How can i find out what causing high swap usage please?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. fi77i

    fi77i Well-Known Member

    Joined:
    Aug 20, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Uruguay
    cPanel Access Level:
    Root Administrator
    You should run a top in the console and check the process you are runing, also check the %wa value (I/O wait).
    You can also check the cpu mem and mysql usage using the cpanel tool to try to identify what process and users are generating the load.

    Show Current CPU Usage

    Regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    - Thank you, i did a TOP, but im a newbie, so i dont know how i can track the source of high SWAP usage?

    [root@xxxx ~]# top
    top - 14:24:28 up 46 days, 21:48, 1 user, load average: 1.01, 1.44, 1.70
    Tasks: 322 total, 5 running, 316 sleeping, 0 stopped, 1 zombie
    Cpu(s): 8.7%us, 0.8%sy, 0.0%ni, 90.2%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 8245744k total, 7455848k used, 789896k free, 151364k buffers
    Swap: 1051064k total, 1007232k used, 43832k free, 4984924k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    5522 seznams 20 0 27964 13m 6024 R 3.6 0.2 0:00.11 php
    5531 kukninet 20 0 28184 14m 6260 S 3.6 0.2 0:00.11 php
    5533 epips 20 0 34232 19m 5740 R 3.6 0.2 0:00.11 php
    19285 mysql 20 0 2880m 1.7g 3868 S 3.6 21.4 1801:58 mysqld
    1648 root 20 0 0 0 0 R 0.3 0.0 8:24.00 kondemand/7
    1834 root 20 0 0 0 0 S 0.3 0.0 136:48.79 md2_raid1
    1838 root 20 0 0 0 0 S 0.3 0.0 86:02.69 md1_raid1
    1840 root 20 0 0 0 0 S 0.3 0.0 21:37.27 kjournald
    5255 root 20 0 2584 1140 784 R 0.3 0.0 0:00.19 top
    5305 nobody 20 0 19832 8984 1692 S 0.3 0.1 0:00.03 httpd
    5374 root 20 0 1860 416 368 S 0.3 0.0 8:24.69 syslogd
    5428 nobody 20 0 19300 8652 1616 S 0.3 0.1 0:00.01 httpd
    23922 named 20 0 119m 24m 412 S 0.3 0.3 131:14.76 named
    1 root 20 0 2204 52 24 S 0.0 0.0 1:37.52 init
    2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root RT 0 0 0 0 S 0.0 0.0 0:02.52 migration/0
    4 root 20 0 0 0 0 S 0.0 0.0 0:35.73 ksoftirqd/0
    5 root RT 0 0 0 0 S 0.0 0.0 0:01.90 migration/1
    6 root 20 0 0 0 0 S 0.0 0.0 0:15.67 ksoftirqd/1
    7 root RT 0 0 0 0 S 0.0 0.0 0:04.30 migration/2
    8 root 20 0 0 0 0 S 0.0 0.0 0:21.02 ksoftirqd/2
    9 root RT 0 0 0 0 S 0.0 0.0 0:02.76 migration/3
    10 root 20 0 0 0 0 S 0.0 0.0 0:28.04 ksoftirqd/3
    11 root RT 0 0 0 0 S 0.0 0.0 0:50.91 migration/4
    12 root 20 0 0 0 0 S 0.0 0.0 3:26.10 ksoftirqd/4
    13 root RT 0 0 0 0 S 0.0 0.0 0:17.01 migration/5
    14 root 20 0 0 0 0 S 0.0 0.0 1:09.02 ksoftirqd/5
    15 root RT 0 0 0 0 S 0.0 0.0 0:08.75 migration/6
    16 root 20 0 0 0 0 S 0.0 0.0 0:39.35 ksoftirqd/6
    17 root RT 0 0 0 0 S 0.0 0.0 0:12.17 migration/7
    18 root 20 0 0 0 0 S 0.0 0.0 0:30.68 ksoftirqd/7

    There are also sometimes spamd processes and mailnull exim processes (suspection on spam - my thread).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 postcd, Aug 19, 2011
    Last edited: Aug 19, 2011
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might want to take a closer look at those accounts. Do you have CSF installed? Server running SuPHP?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Thank You, CSF not installed, im using server to host only my own sites.. Do you strongly recommend it or should i leave it? SuPHP?
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none
    Apache suEXEC on

    Is it ok, what should i do? The accounts above contains several sites.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Most do use CSF, yes. It might point you to the out of date, problematic or rogue scripts running on one or more of those accounts.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    I think swap high usage was stuck because try to deliver 19k messages in mail queue or something regarding this. After Mysql restart swap is back to 6% usage.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You shouldn't be using any swap.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Thank You, InfoPro i sent You a PM yesterday with question regarding CSFirewall for cPanel. Did you received it please?

    Swap Used 13.52%
    its like 140Mb..

    How i can know what is the source of this usage and track it please?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I don't answer support questions via private messages. As to your question, I answered it above.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Hi, Your answer is too general and did not made me or any other readers to learn anything. I still need to know answer "How i can know what is the source of this usage and track it please?".
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Installing CSF will help. I was clear on that above I thought.

    You have to understand, this is not a cPanel problem you're having, its a server management issue. There is no problem with your cPanel and thats what these forums are for, supporting the product that is cPanel. This is not a server management forum.

    If you're unsure of how to proceed you might want to consider hiring someone:
    cPanel Application Catalog

    For example: If you have a website with a calendar on it, and that calendar script is not up to date or secure and is being attacked, you might see this sort of behavior (using swap) with your system that you are seeing right now.

    I can't tell you whats going on with those accounts mentioned above, but there is something going on there I'm sure of it. CSF might help there to point out the problems.



    If these are your own sites, suspend them. That blocks all attacks to out of date insecure scripts on them and your system should hopefully return back to normal parameters.


    19,000 emails, or something?

    I'm not sure what sort of assistance you wish to get from these forums, but you've got to have some concern for your own server. If you're too busy get yourself a managed server so you can get back to working out front on your websites.


    Install CSF, open it in WHM, find the button for "Firewall Security Level" and click. On the page that opens, click the button for level, High. Restart CSF.

    Make sure your root email from server is working and you receive email from server. And wait. CSF is going to alert you to issues on that server soon enough.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    BTW, posting this issue to multiple threads is not helpful at all.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Please can anyone help to examine what is using that much SWAP in my cpanel sub accounts?
    Where can i check and know?
    Thank you in advance. P.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. compuhost

    compuhost Member

    Joined:
    Aug 19, 2011
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    51
    " Installing CSF will help. "

    If you research WHMxtra, you can find a license for about 4 bucks / month.
    WHMxtra can install CSF for you and also has plenty of monitoring tools.

    Matthew
     
  16. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    692
    Likes Received:
    14
    Trophy Points:
    68
    Thanks, SOLVED...

    After deleting mail queue (19K mails) and increasing join buffer size, activating Config Server Firewal and restarting server. Load went from 3.0 average to 1.2 average. Its something.

    SWAP looks to be no longer issue.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice