简体   繁体   中英

MySQL sudden performance drop

One of the projects I'm working on is suffering from a recent slowdown in the DB (since last week).

Code hasn't changed, data may have changed a little but not significantly so at this stage I'm just exploring DB configuration (as we are on a managed hosting platform, end have had some similar issues in the past).

Unfortunately I'm out of my depth a bit... could anyone please take a look at the output from SHOW STATUS below and see if any of it sets alarm bells off? The only thing I've spotted so far is that key_reads vs key_read_requests don't seem quite right.

Our setup is 2 servers replicated, with all reads done from the slave. Queries which run in 0.01 secs on the master are taking up to 7 secs on the slave... and this has only started recently.

All tables are MyIsam and inserts/updates are negligible (updates happen out of hours). Front end is an ASP .NET website (.NET 4) running on IIS8 with a devart component for data access.

Thanks!

SHOW STATUS output is here: http://pastebin.com/w6xDeD48

Other factors can impact MySQL performance:

  • virus scanning software -> I had a issue with McAfee bogging out peformance due to it scanning temporary table files
  • Other services running on server?

Have you tried a EXPLAIN SELECT on the query? This would given you an indication of the index size. As @Liath indicated the indexes may be out of date on the slave but find on the master.

Just an update in case it ever helps anyone else in future - it looks like the culprit might be the query cache for now, as we are seeing better performance with it turned off (still not quite as good as we had before the issue).

So we will try to tune it a little and get back to great performance!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM