Home > database >  MYSQL from library continues to increase memory, don't release, volatile project server bandwid
MYSQL from library continues to increase memory, don't release, volatile project server bandwid

Time:09-24

Before found from library CPU volatility jumped from 10% to 99%), field after adding indexes (CPU 10% to 40%), but the mysql footprint is rising, not released, found in the CPU to jump 40%, project server bandwidth is very high, fell back to 10% CPU bandwidth after returned to normal, in mysql saw sleep process is continuously kill, Montana is there any help?

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 machine
MYSQL 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
  • Related