Configuring threadpool
Pool-of-threads, or threadpool, is a MariaDB feature that improves performance by pooling active threads together instead of the old one thread per client connection method, which does not scale well for typical web-based workloads with many short-running queries.
How to do it...
To enable threadpool on Linux, add the following line of code to our
my.cnf
file (or to an existing[mysqld]
section) and then restart MariaDB:[mysqld] thread_handling = pool-of-threads
To enable threadpool on Windows, we don't have to do anything as it is set by default and uses the native Windows thread pooling.
To disable threadpool on Windows, add the following to our main
my.ini
file and then restart MariaDB:[mysqld] thread_handling = one-thread-per-connection
To disable threadpool on Linux, either change the
thread_handling
line toone-thread-per-connection
, as on Windows, or remove thethread_handling
line from our system'smy.cnf
file, and then restart MariaDB.
How it works...
When threadpool...