v.19.11New Feature
Added Os_thread_priority Setting That Allows to Control the "nice" Value of Query Processing Threads That Is Used by OS to Adjust Dynamic Scheduling Priority
Addedos_thread_prioritysetting that allows to control the "nice" value of query processing threads that is used by OS to adjust dynamic scheduling priority. It requiresCAP_SYS_NICEcapabilities to work. This implements #5858 #5909 (alexey-milovidov)
Why it matters
The feature addresses the need to manage CPU scheduling priorities for query processing threads in ClickHouse. By setting the thread priority, users can influence how the OS allocates CPU time, which can improve performance balancing and resource management on multi-tenant or resource-constrained systems. It requires theCAP_SYS_NICE capability to function.How to use it
Users can enable or adjust this feature by setting theos_thread_priority parameter in the ClickHouse server or client configuration files or via session settings. The value sets the "nice" level for query processing threads (typically a numeric value where lower is higher priority). Ensure that the ClickHouse process has the CAP_SYS_NICE capability to apply this setting successfully.