How Does Binary Scheduler Work?
The Binary Workload Scheduler is designed to handle two distinct types of workloads: primary workloads (regular application queries) and secondary workloads (adhoc queries, testing, etc.) Primary Workload Processing:- Primary workload queries are executed with priority and submitted to runner threads immediately upon arrival
- Resources used by primary workload queries are not capped
-
Secondary workload queries are identified using the query option
SET isSecondaryWorkload=true - These queries are processed through a constrained system with restrictions on runner threads, worker threads per query, and total worker threads for all in-progress secondary queries
How to Enable
-
Configure the Scheduler: Set the query scheduler algorithm to
binary_workloadin your Pinot cluster configuration: -
Mark Secondary Workload Queries: Use the query option to identify secondary workload queries
-
Optional Configuration: Configure the maximum number of pending secondary queries
Limitations
- Only works for Single Stage Engine queries
- If primary workload queries end up occupying all threads - this will block any secondary workload queries
- Secondary workload queries can be rejected with “OutOfCapacityException” when the system cannot accommodate them
Relevant Metrics
- numSecondaryQueries_Count

