我要评分
获取效率
正确性
完整性
易理解

Setting thread_pool_size to a Small Value

Compared with the default configuration mode, setting a small thread_pool_size creates more active threads in each thread group. In this manner, after the connection of a long query is bound to a thread group, executing the long query only has a minor impact on the execution of other short queries in the thread group. Also, in OLTP write-only scenarios, when there are many connections (for example, 8192), the performance can remain about 90% of the optimal in the configuration mode of a small number of thread groups.

Compared with the default mode (which uses default parameters), configuring a small number of thread groups can achieve higher peak performance when there are many concurrent connections. For details about the configuration, see Table 1.

Table 1 Reference for configuring a small number of thread groups

Parameter

Default Mode

Configuration with a Small Number of Thread Groups

thread_pool_size

Use the default value (the number of logical CPU cores). You can also manually set it to one to three times the number of logical CPU cores.

Set this parameter to four times the number of NUMA nodes (empirical value in TPCH scenarios).

thread_pool_dedicated_listener

Use the default value OFF which indicates that the listener thread can be converted to a worker thread.

Set it to ON, so that the listener thread only waits for network events and will not be converted to a worker thread.

thread_pool_oversubscribe

Use the default value 3.

Set it to the number of connections for the optimal performance of the baseline version divided by the value of thread_pool_size.

thread_pool_toobusy

Use the default value 13.

Set it to the same value as thread_pool_oversubscribe.