v.25.4New Feature

Reject queries when the server is overloaded

Reject queries when the server is overloaded. The decision is made based on the ratio of wait time (OSCPUWaitMicroseconds) to busy time (OSCPUVirtualTimeMicroseconds). The query is dropped with some probability, when this ratio is between min_os_cpu_wait_time_ratio_to_throw and max_os_cpu_wait_time_ratio_to_throw (those are query level settings). #63206 (Alexey Katsman).
Introduces query rejection when the server is overloaded, based on the ratio of CPU wait time to CPU busy time.

Why it matters

This feature helps prevent server overload by probabilistically rejecting queries when the system experiences high CPU wait times relative to CPU busy times, improving overall stability and responsiveness.

How to use it

Set the query-level settings min_os_cpu_wait_time_ratio_to_throw and max_os_cpu_wait_time_ratio_to_throw to define the CPU wait-to-busy time ratio range. Queries within this range will be rejected with some probability based on the configured thresholds.