MySQL 5.1 – Thread Pool Support
Since few weeks I was working on patching the MySQL 5.1 with libevent support to have thread pooling in server end as it is needed by few properties where they do not need a persistent connection and needed to scale server with thousands of connections as each call just does a simple query execution by connecting and disconnecting and pooling seemed to be a right choice.
When I brought this idea to Monty; he pointed me to 6.0 where it is in preliminary stage. Now I took the same design and implemented in 5.1 to be compatible with how its working in 6.0; and things so far seems to be running fine, except few misc glitches that am trying to solve now.
It uses the same thread_handling=one-thread-per-connection (default) and new thread_handling=pool_of_threads and thread_pool_size controls how many will be initialized and kept at the startup.
| thread_handling | pool-of-threads | | thread_pool_size | 5010 | |
Few things that are missing from the 6.0 is the status of thread pools (number of threads currently in use, max used so far from pool etc) are all added now.
I am currently benchmarking the performance between the regular persistent to pool-of-threads model to see how it works out. I will post more details once I have the graphs and numbers along with working model.
