I have a strange situation on one of my MySQL servers.
mysqladmin status
and SELECT * FROM information_schema.global_status
clearly shows, that MySQL experiences a load of about 1000 queries per second. top
says, that MySQL server takes about 250% of CPU on that 8-core system.
But if I do SHOW FULL PROCESSLIST
I can see only about 4-5 entries there with very quick queries, taking less than a second to complete. If I run mytop
, it shows qps of 2-3 and same queries, not more.
How can this be? What could be excluded from process list?
MySQL is 5.6 there.
The SHOW FULL PROCESSLIST
command only shows you which threads (like tcp connections) are currently running and what they are doing. The fact that it only shows you 4-5 entries just means there are 4-5 concurrent connections.
These connections could very well be processing 200 small/simple queries per second, thus running queries that take 0.005 seconds to complete each.
If you want to be certain of what's happening, you could also temporarily enable the General Query Log, so you can actually see all queries that are run by the server.