MySQL从5.5.16开始,在MySQL的商业化版本中将Thread Pool作为plugin提供官方功能支持。后来MariaDB也实现了这一功能,Percona也跟进实现了。从这几天对Percona 5.6.16版本做了下thread pool对比测试,试图找到较为合适的配置参数。
下面是几个测试模式对比:
| 模式 | 配置参数 | 
| Percona 5.6.16-nothp | 未开启 thread pool 模式 | 
| CASE0-thp(128)-oversub(16)-max(2048) | 
      thread_handling = pool-of-threads thread_pool_size = 128 thread_pool_oversubscribe = 16 thread_pool_max_threads = 2048  | 
  
| CASE1-thp(default) | 
      thread_handling = pool-of-threads 其他默认设置  | 
  
| … |