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.

Will moving Mysql to another server reduce load?

Discussion in 'Workarounds and Optimization' started by craigedmonds, Jan 17, 2011.

  1. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have a dedicated server which sells shared server space and its running WHM/Cpanel and maybe a couple of times a day the load shoots up to 25+ and I have a script which stops httpd and then restarts when load is back down to 8. The httpd service is only down for 60 seconds or so, not much more but its a bit annoying when it happens.

    The server has quite a few sites on it, maybe 250 or so, varying from wordpress, static etc. The sites are delivered very fast but whilst running TOP - C in SSH I can see mysql user at 6% then 25% then 80% then 33% etc so its fluctuating all over the place.

    Its very difficult to establish exactly which user is causing loads but I am wondering if I should move the mysql databases over to a separate Cpanel server.

    Would this reduce the load significantly? I am assuming that some of the load is from users using the mysql service.

    Thoughts anyone?
     
  2. rrwh

    rrwh Well-Known Member

    Joined:
    Oct 2, 2004
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    first thing to do is to tune mysql if you have not already done so.
     
  3. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    You can found which database queries are higher using the command mysqladmin pr. A fine tuning will resolve the issue.
    After that only you need to think about a database server.
     
  4. 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 Craig,

    We have a script on the 11.28+ machines that you can run to get suggestions for MySQL Optimization:

    Code:
    /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl
    You can simply run that and wait for the output. Any suggestions it provides would be placed into /etc/my.cnf file. I'd suggest running that script once every 24 hours for a few days, then tweaking using the suggestions at that time to see the results.

    I also have a MySQL Optimization presentation that I did at our cPanel Conference last year - MySQL Optimization | cPanel Video Site

    Thanks.
     
Loading...

Share This Page