I found reported behavior. I configured 3 slaves for master server.
mysql> show full processlist\G
*************************** 1. row ***************************
User: repl
Host: slave2:45596
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*************************** 2. row ***************************
User: repl
Host: slave1:58470
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*************************** 3. row ***************************
User: repl
Host: slave3:59205
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*************************** 4. row ***************************
User: root
Host: localhost
db: NULL
Command: Query
Time: 0
State: init
I found all four threads occupied by thread pool.
Threadpool_threads - Threadpool_idle_threads = 4 threads (1 root user connection thread to MySQL, 3 "Binlog Dump" threads
I found reported behavior. I configured 3 slaves for master server.
mysql> show full processlist\G ******* ******* ****** 1. row ******* ******* ******* ****** ******* ******* ****** 2. row ******* ******* ******* ****** ******* ******* ****** 3. row ******* ******* ******* ****** ******* ******* ****** 4. row ******* ******* ******* ******
*******
User: repl
Host: slave2:45596
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*******
User: repl
Host: slave1:58470
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*******
User: repl
Host: slave3:59205
db: NULL
Command: Binlog Dump
Time: 81054
State: Master has sent all binlog to slave; waiting for binlog to be updated
*******
User: root
Host: localhost
db: NULL
Command: Query
Time: 0
State: init
I found all four threads occupied by thread pool. idle_threads = 4 threads (1 root user connection thread to MySQL, 3 "Binlog Dump" threads
Threadpool_threads - Threadpool_
mysql> show status like 'Thread%'; ------- ------- -----+- ------+ ------- ------- -----+- ------+ idle_threads | 7 | ------- ------- -----+- ------+
+------
| Variable_name | Value |
+------
| Threadpool_
| Threadpool_threads | 11 |
| Threads_cached | 0 |
| Threads_connected | 4 |
| Threads_created | 201 |
| Threads_running | 4 |
+------
I executed mysqlslap with gradually increasing --concurrency
mysql> show status like 'Thread%'; ------- ------- -----+- ------+ ------- ------- -----+- ------+ idle_threads | 58 | ------- ------- -----+- ------+
+------
| Variable_name | Value |
+------
| Threadpool_
| Threadpool_threads | 62 |
| Threads_cached | 0 |
| Threads_connected | 99 |
| Threads_created | 257 |
| Threads_running | 45 |
+------
mysql> show status like 'Thread%'; ------- ------- -----+- ------+ ------- ------- -----+- ------+ idle_threads | 60 | ------- ------- -----+- ------+
+------
| Variable_name | Value |
+------
| Threadpool_
| Threadpool_threads | 64 |
| Threads_cached | 0 |
| Threads_connected | 45 |
| Threads_created | 261 |
| Threads_running | 22 |
+------
mysql> show global variables like 'Thread_pool%'; ------- ------- ------- ----+-- ------- -----+ ------- ------- ------- ----+-- ------- -----+ pool_high_ prio_mode | transactions | pool_high_ prio_tickets | 4294967295 | pool_idle_ timeout | 60 | pool_max_ threads | 100000 | pool_oversubscr ibe | 5 | pool_stall_ limit | 500 | ------- ------- ------- ----+-- ------- -----+
+------
| Variable_name | Value |
+------
| thread_
| thread_
| thread_
| thread_
| thread_
| thread_pool_size | 8 |
| thread_
+------