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.

High CPU Usage for PHP and MySQL on VPS

Discussion in 'Workarounds and Optimization' started by Bestrafung, Feb 21, 2014.

  1. Bestrafung

    Bestrafung Active Member

    Joined:
    Apr 2, 2012
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I have a cPanel VPS setup on CentOS 5.10 running under Hyper-V (Windows Server 2008 R2). Everything was running fine until recently when we installed a chat addon to a client's vBulletin forums. Anytime the chat addon is used the server load skyrockets. While looking into this I see that we are getting a large amount of CPU usage in general for PHP and MySQL. I have confirmed it's not a memory or swap issue. Does anyone have any ideas what could be causing the high usage or how to reduce it?

    Here's some of the information from WHM's top processes:
    User Domain % CPU Process
    user1 user1.com 48.0
    PHP:
     <defunct>
    user1     user1.com     47.0          [php] <defunct>
    user2     user2.com     46.0          [php] <defunct>
    user2     user2.com     42.0          [php] <defunct>
    user3     user3.com     38.0          [php] <defunct>
    user2     user2.com     38.0          /usr/bin/php /home/user2/public_html/vbshout.php

    There
    's a dozen or so more in the 15-25% range as well.

    Apache/2.2.26
    PHP 5.3.28


    EDIT: I'
    ve heard that dynamic disks in Hyper-V VMs can introduce I/O issues over fixed disksDoes anyone have any experience with this and whether or not it could be leading to the high loadI suspect that the dynamic disk is causing I/O wait or load with mysql which is in turn causing high CPU usage with PHPbut it's just a theory. I plan to convert the system to a fixed disk as soon as I have more scheduled downtime anyway I was just curious if anyone had any experience with this.
     
    #1 Bestrafung, Feb 21, 2014
    Last edited: Feb 21, 2014
  2. thinkbot

    thinkbot Well-Known Member

    Joined:
    Oct 30, 2012
    Messages:
    326
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    check mysql slow queries and make sure you have php opcode installed, like APC or eaccelerator
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you checked with the developers or support team for this plugin to rule out any issues with the application itself? It's possible there is a flaw in the application that results in high load under heavy usage.

    Thank you.
     
Loading...

Share This Page