Buy Percona ServicesBuy Now!

Impact of the number of idle connections in MySQL (version 2)

 | December 20, 2010 |  Posted In: Insight for DBAs, MySQL


Last Friday I published results of DBT2 performance while varying the number of idle connections here, but I had compiled MySQL with the debugging code enabled. That completely screw up my results, be aware… debug options have a huge performance impact. So, I recompiled Percona-Server 11.2 without the debug options and did another benchmark run. The result is shown below:

As you can see, the impact is more moderate and far less shocking. The performance loss is approximately of 1% per 1000 of idle connections. Although it is something to keep in mind, there is no big stress with these idle connections.

Yves Trudeau

Yves is a Principal Consultant at Percona, specializing in distributed technologies such as MySQL Cluster, Pacemaker and XtraDB cluster. He was previously a senior consultant for MySQL and Sun Microsystems. He holds a Ph.D. in Experimental Physics.


  • Yves,

    Thanks for update. Note the cost of connection handling you imply here should be constant per query… meaning the overhead could be higher with very fast connections. The NoTPM number you showed here is rather low which means number of queries was low for some reason (data size, cost of commit, I do not know) It would be really interesting to see the same graph for sysbench PK reads, which is basically as fast as it gets… the overhead could be larger

  • I think scaling the y axis on the graph from 0 .. 6000 as opposed to 5600 … 6000 would give a better visual indication that this is a very minor decline.

    Just glancing at the graph (as I did this morning) made me do a double take.

  • Why the correlation between No.of idle connect and performance is negative?

    Is it because MySQL implements the multiple port request by ‘select method’?

Leave a Reply