The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enormous CPU Usage on New Server with cPanel

Discussion in 'General Discussion' started by HostCenter IL, Dec 1, 2011.

  1. HostCenter IL

    HostCenter IL Active Member
    PartnerNOC

    Joined:
    Nov 22, 2011
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I'm new to cPanel and recently installed a copy on a fresh VPS which is easy satisfies the system requirements for cPanel/WHM.

    However, after installing just 3 websites (with low traffic and common CMSs like WordPress), every time I visit a website, the server completely freezes up with 60%–100% CPU usage (most of it on the system space--see below for part of the top output). The individual processes in user space never take too much CPU, so it's really hard to tell what's causing the problem.

    The only major change I made to the server through cPanel was to rebuild with EasyApache including the latest version of PHP (5.3.8) and a series of addons common on shared servers.

    Please advice on how to troubleshoot/resolve this problem.

    Thanks in advance,
    —Yoni.

    ====

    Tasks: 136 total, 9 running, 127 sleeping, 0 stopped, 0 zombie
    Cpu(s): 16.2%us, 83.8%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 2058752k total, 1807308k used, 251444k free, 211712k buffers
    Swap: 522104k total, 182556k used, 339548k free, 821984k cached
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Could we see more details on the machine such as "free -m" and some of the top processes? Also, is the load itself increasing during these high system CPU times?

    Next, have you checked WHM > Daily Process Logs area for any additional information?

    Finally, what PHP handler are you using on the system? This can be seen in WHM > Apache Configuration > PHP and SuExec Configuration area.

    Thanks!
     
  3. HostCenter IL

    HostCenter IL Active Member
    PartnerNOC

    Joined:
    Nov 22, 2011
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Top screenshot (during problem):

    /http://ynhockey.net/personal/cpanel_linux_top2.png

    Free -m:

    total used free shared buffers cached
    Mem: 2010 1816 193 0 264 794
    -/+ buffers/cache: 758 1252
    Swap: 509 178 331

    PHP Handler:
    (PHP5) : suphp

    I have checked the daily process logs and all the available monitoring tools on WHM, but it always paints a picture as if nothing is wrong. The highest process is: root 0.34 (CPU) 19.36 (MEM) 2.0 (MySQL).

    Please let me know if you need additional information.

    Thank you for the help.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,456
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might check these three websites for out of date modules or addons. Something is clearly using Swap on the server but shouldn't be.
     
  5. HostCenter IL

    HostCenter IL Active Member
    PartnerNOC

    Joined:
    Nov 22, 2011
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thanks, I will check. However, just to clarify a point: can high swap usage really impact CPU that much and create such loads? Ultimately the problem is in the CPU load which balloons to 100%.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,456
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    And out of date / not secure script can cause more problems than you want to deal with. If you're using Swap, you're using the hard drive, not Memory. If a single script is running out of control, or being attacked for example, not only can it spike Swap, CPU and generally slow the server to a crawl but it could take down the entire server completely. You bet.
     
Loading...

Share This Page