Munin shows HUGE slow MySQL queries - nothing in logs

Munin has been showing slow MySQL queries. A disturbing number of them with insane times.

~~![](<URL url=)http://viperquest.com/xeoz/slowqueries-day.png" />

20 minutes?! And it just happens to occur at 00:00?

Okay now here's the kicker. I have slow query logging enabled, and when I examine the logs I do find slow queries. About 5-15 a day, most in the 2-4 second range. The longest executing query I've seen in the logs was 16 seconds.

I'm new to munin, so I am probably misunderstanding the graph. Or have somehow misconfigured it. How is munin getting this information? Is there any way to force it to show me exactly what queries it's seeing?

I get 600,000 pageviews a month (90% of that is on SMF forums and mediawiki) and I haven't heard one complaint about slow pages. Every time I time the sites I see php pages with average query loads respond in ~300ms.

Also, is anyone else trying to handle this kind of traffic on a 360? I'd like to know your mysql settings. :D~~

2 Replies

The graph isn't saying anything about the duration, it's saying how frequently they occur (and that little "m" is important).

That big spike in the middle means there where is goes up to 20 means at that time you were seeing 0.02 slow queries per second (so, around 1/minute). So, that spike would be caused if there were half a dozen slow queries in that 5 minute window. Does that sound reasonable?

~JW

Okay, that makes a lot more sense! Thank you. I was reading 20m as 20 minutes lol. Rate makes a lot more sense than duration.

So it is clear that I need to find a way to optimize more. :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct