MySQL Queries Per Second – How to Measure and Optimize

MySQL

I have Installed MySQL Server 5.6.23 on Centos server and the configuration of the server is

16 GB RAM
8 Core
CPU op-mode(s): 32-bit, 64-bit

When I check the status of the server it is showing me Queries per second avg: 22112.191

enter image description here

Still my server is running fine and there is no issue in read & write operation but I would like to know what is the maximum Queries per second my server can handle and what can I do to reduce it.?

Thanks in advance.

Best Answer

22K QPS is nice; I rarely see that high a number on a production system. You must be doing rather trivial queries. (In a quick survey, 7K is the 90th percentile.)

Do you use a lot of Stored Routines? What is your Questions/Uptime?

It is unlikely that a high query rate will "crash" MySQL. It can slow things down to the point where it feels "crashed".

How many active connections do you have? When SHOW PROCESSLIST show more than a few dozen queries running (not "Sleep") at a time, you are threatening to get in this overburdened situation.

There have been benchmarks (carefully designed) that registered more than a million queries per second. I could devise a situation that could saturate all the system resources, yet achieve only 1 query per minute. Those extremes indicate that there are a lot of factors going on.