← Back to team overview

maria-developers team mailing list archive

Correct way to determine the ThreadPool usage

 

Hello,

I am counter-checking the mysqlreport "fork" i am maintening (https://mariadb.atlassian.net/browse/MDEV-573) so it could be included in Maria 10 before GA, i am actually unsure that i am checking correctly the Threadpool usage.


For these stats (with thread_pool_max_threads=1200 and thread_handling=pool-of-threads) :

   +------------------------------------------+---------+
   | Variable_name                            | Value   |
   +------------------------------------------+---------+
   | Threadpool_idle_threads                  | 47      |
   | Threadpool_threads                       | 52      |
   | Threads_cached                           | 0       |
   | Threads_connected                        | 19      |
   | Threads_created                          | 599771  |
   | Threads_running                          | 6       |
   +------------------------------------------+---------+

The actual output is :

   __ Threads ___________________________________________

   Running             6 of     24

   Created       599.77k       0.2/s

   Slow                0         0/s

   Threadpool         98 of   1200     %Used:   8.17

      Running          52 of   1200  %Running:   4.33

      Idle             46 of   1200     %Idle:   3.83


The formulae used are :

   Threadpool    $stats{'Threadpool_threads'} + $stats{'Threadpool_idle_threads'})   of  $vars{'thread_pool_max_threads'}    %Used: percentage(
   ($stats{'Threadpool_threads'} + $stats{'Threadpool_idle_threads'}) /
   $vars{'thread_pool_max_threads'}

        Running   $stats{'Threadpool_threads'}  of
   $vars{'thread_pool_max_threads'}    %Running:
   percentage($stats{'Threadpool_threads'} /
   $vars{'thread_pool_max_threads'})

        Idle     $stats{'Threadpool_idle_threads'}  of
   $vars{'thread_pool_max_threads'}    %Idle:
   percentage($stats{'Threadpool_idle_threads'} /
   $vars{'thread_pool_max_threads'})



Is the Threadpool usage calculation right or should only the Threadpool_threads status be used? What is the meaning of the Threads_connected value when the threadpool is used?


Regards.