Will moving Mysql to another server reduce load?

craigedmonds

Well-Known Member
Oct 29, 2007
115
1
68
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?
 

rrwh

Well-Known Member
Oct 2, 2004
48
0
156
first thing to do is to tune mysql if you have not already done so.
 

LinuxTechie

Well-Known Member
Jan 22, 2011
502
14
68
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
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.