Buying High MySQL CPU usage. Looking for Someone Experienced to Fix This

Discussion in 'Programming' started by Big0ne, Jul 4, 2010.

  1. #1
    I am looking for some experienced coder with MySQL and PHP knowledge to find and fix what is causing really high server load. Sometimes Load Averages go to: 15.07 15.46 ...

    This has been happening for last two weeks I an have no clue what is causing this.

    Dedicated server stats:
    Intel® Core™ i7-920 Quadcore
    RAM 8 GB DDR3 RAM
    ...


    I am prepared to pay up to 15USD to Paypal.
     
    Big0ne, Jul 4, 2010 IP
  2. amrox

    amrox Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Can you give more information?
    Which distribution/version. What's running? How much traffic? What's in Mysql? Is load always high, or just occasional?
    What does 'top' say is causing the high load.
    I'm happy to take a look at if - PM me if you haven't already found someone to help out
     
    amrox, Jul 4, 2010 IP
  3. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    It's running on WHM. Load is not always high but traffic is pretty much the same. About 170 visitors online, across all the sites.

    Here is screeenshot taken few minutes ago. You can see server load is currently fine, but might go insane anytime soon.

    [​IMG]
     
    Big0ne, Jul 4, 2010 IP
  4. amrox

    amrox Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Try running "show status" in a mysql prompt when the server is experiencing both high and low load.
    Do you have awstats, or some other web traffic monitoring?
     
    amrox, Jul 4, 2010 IP
  5. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    I have disabled awstats few days ago, because I thought of this as well.

    I tried to run show status via SSH, but command didn't work. I presume I would need to do it somewhere else.

    Anyhow, her is screen of sql processes.

    [​IMG]

    Thank you for helping me!
     
    Big0ne, Jul 4, 2010 IP
  6. amrox

    amrox Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    this isn't a Linux command, you need to type it into mysql.
    After you ssh to your box, type "mysql -p", you will be promoted for your password. Then you can type "show status;"
    This will give you a whole bunch of information regarding connections, queries, open tables, service uptime and loads more.

    For awstats, I was thinking taking a look at stats. I once had high load caused by mysql, which resulted in nagios (monitoring tool) raising an alert. After looking at awstats I saw that there were a couple of IPs with many hists on specific PHP pages. This resulted in the same queries being run which raised the load. Not sure if you've got the same problem, but it wouldn't hurt taking a look.
     
    amrox, Jul 4, 2010 IP
  7. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Thank you for guiding me, here is the output of show status: http://hidetxt.com/hidden/75063873.png

    Amrox, would you be interested in taking this 'job', since it seems you know a lot about this...
     
    Big0ne, Jul 4, 2010 IP
  8. amrox

    amrox Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    sure, I'll be happy to.
    Pls send details as a PM
     
    amrox, Jul 4, 2010 IP
  9. andika.adi.s1

    andika.adi.s1 Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #9
    Go into the php.ini file and set the maximum execution time up from 30 seconds to something higher, as needed. It is also not a bad idea to double the RAM allowed per script to 16MB instead of 8MB.
     
    andika.adi.s1, Jul 4, 2010 IP
  10. mrnothersan

    mrnothersan Member

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #10
    Can you give a list on everything that is using databases on your server?
     
    mrnothersan, Jul 5, 2010 IP
  11. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #11
    Thank you guys for all the suggestion, but amrox is already taking care of this issue.
     
    Big0ne, Jul 5, 2010 IP