How do I determine the cause of a sustained spike in mysql queries/activity?

Posted by mattmcmanus on Server Fault See other posts from Server Fault or by mattmcmanus
Published on 2010-03-11T15:12:52Z Indexed on 2010/03/11 17:20 UTC
Read the original article Hit count: 478

Filed under:
|
|
|

So this is more of a "I'm trying to learn about how this works" question rather than "there is a serious problem I can't figure out!" question. I'm setting up a VPS and have been tweaking and changing things here and there. I recently installed munin (like two days ago) and yesterday I noticed a significant increase in mysql activity.

So now my curiosity is going crazy. How do I setup/access mysql's query log? I have about 5 databases on the server so I want to see which one is getting all the action. Is there anything else I can do to keep a better eye on what's going on?

Here are the graphs. As you can tell, it's not that much activity at all but I'm just curious at the change. The sites that are on the server right now do not get a lot of traffic. It's running a couple drupal sites, only one of which is live. The live one hasn't had a spike in traffic and the last spike was 250 visitors so it's barely a spike at all.

munin mysql queries graph

munin mysql bytes graph

© Server Fault or respective owner

Related posts about mysql

Related posts about linux