CodePudding user response:
CPU spikes in running SQL, this in addition to the optimization of SQL, there should be no other way.CodePudding user response:
1, don't change machineMYSQL monitoring tools -- mytop
http://www.cnblogs.com/lxwphp/p/9770597.html
Check what SQL execution is too slow need optimization, a time for all SQL optimization tuning parameters, perform at night to have down time is more long
Then using iostat - xm 1 to monitor the disk, see CPU and memory with top
2, change equipment
This kind of situation is usually disk IO couldn't keep up with, and then pile up on the memory and CPU, then find a IO performance good machine measure IO, if is faster than the old host, make a different machine, make the original host for the server, and then find a time to cut to the new server to look at, and I used to put a load in front of the main library, cutting, stop, check the binlog main equipment is consistent, then the IP refers to the load to the standby machine, monitoring the business, if no problem, the main library offline, for variant host