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.

Load High - Caused by MySQL

Discussion in 'General Discussion' started by coderoyal, Jan 7, 2009.

  1. coderoyal

    coderoyal Well-Known Member

    Joined:
    Mar 8, 2005
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Our server is often dealing with a high load and after several days we've determined that the problem was caused by mysql.

    I turned off the mysql service and saw the load quickly drop.

    Basically, the behavior is sporatic. Normally the server will run fine with a load average below 1. Then, all of a sudden, there's a lot of HDD activity on the Raid, and the server becomes unresponsive.

    If we are able to get into console, we see the load can be up to 20. (SSH usually times out, and so can web logins to the WHM).

    I've ran the mysqladmin proc command, but with so many websites, I couldn't and don't know what to look for at the results of this command.

    What could cause such a high load with MYSQL on a cPanel server? What can we do to trace the user account responsible for such as load?

    Thanks!
    Alan
    Hermon School Department
     
  2. big_bull

    big_bull Well-Known Member

    Joined:
    Nov 19, 2006
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    check which database caused high server load just by

    mysqladmin pr

    and suspend it in /var/lib/mysql

    by chmod 000 database name
     
  3. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
  4. nichiyume

    nichiyume Member

    Joined:
    Nov 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Phoenix, Az
    I would run the mysqlreport script to get an understanding of what is being used or not used in your my.cnf. A default or poorly constructed mysql configuration would end up using much more cpu than a fine tuned one:

    http://hackmysql.com/mysqlreport

    Although I wouldn't trust every recommendation this script has, but I've used it to explore more:

    http://genomewiki.ucsc.edu/index.php/Tuning-primer.sh

    Also in myphpadmin, there is a "Show MySQL runtime information" on its first page that will give recommendations.

    You can also switch to innodb tables and crank up the cache for innodb so they stay in memory on busy tables.

    Hope that helps.
     
Loading...

Share This Page