v.25.8New Feature
Enable preemptive CPU scheduling
Server settingcpu_slot_preemptionenables preemptive CPU scheduling for workloads and ensures max-min fair allocation of CPU time among workloads. New workload settings for CPU throttling are added:max_cpus,max_cpu_shareandmax_burst_cpu_seconds. More details: https://clickhouse.com/docs/operations/workload-scheduling#cpu_scheduling. #80879 (Sergei Trifonov).
Why it matters
This feature provides max-min fair allocation of CPU time among workloads by allowing the server to preempt CPU slots. It solves the problem of CPU resource contention and improves workload scheduling fairness and efficiency, ensuring workloads can be throttled and controlled precisely based on CPU usage.How to use it
Enable preemptive CPU scheduling by settingcpu_slot_preemption on the server. Configure workload CPU limits using the new settings max_cpus, max_cpu_share, and max_burst_cpu_seconds in the workload configurations. For example:SET cpu_slot_preemption = 1;
-- Then configure workload with max_cpus, max_cpu_share, max_burst_cpu_seconds