Comment 1 for bug 1381848

Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :

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

mysql> show status like 'Thread%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| Threadpool_idle_threads | 7 |
| 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%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| Threadpool_idle_threads | 58 |
| Threadpool_threads | 62 |
| Threads_cached | 0 |
| Threads_connected | 99 |
| Threads_created | 257 |
| Threads_running | 45 |
+-------------------------+-------+

mysql> show status like 'Thread%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| Threadpool_idle_threads | 60 |
| Threadpool_threads | 64 |
| Threads_cached | 0 |
| Threads_connected | 45 |
| Threads_created | 261 |
| Threads_running | 22 |
+-------------------------+-------+

mysql> show global variables like 'Thread_pool%';
+-------------------------------+--------------+
| Variable_name | Value |
+-------------------------------+--------------+
| thread_pool_high_prio_mode | transactions |
| thread_pool_high_prio_tickets | 4294967295 |
| thread_pool_idle_timeout | 60 |
| thread_pool_max_threads | 100000 |
| thread_pool_oversubscribe | 5 |
| thread_pool_size | 8 |
| thread_pool_stall_limit | 500 |
+-------------------------------+--------------+