-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: integrate admission control for SQL=>KV and KV=>SQL
- Add roachpb.AdmissionHeader used for KV admission control. - Initialize this for NewTxnWithSteppingEnabled that is used by SQL. Other paths will bypass KV admission control. - Node.Batch does server-side admission control for KV. - sql.tableWriterBase and row.txnKVFetcher do KV=>SQL response admission control since these are the shared read and write paths. - Cluster settings to enable admission control. - RegisterRunnableCountCallback is used to register for unsmoothed load information, as used in earlier experiments. - The grant chaining in the admission package was causing the runnable count to be too low. Grant batching is introduced, that goes along with chaining. Additionally, we also immediately terminate and start a new grant chain, since the lag in asking for termination and waiting for it to happen was also preventing runnable counts from getting to a higher value. These changes were evaluated using kv50/enc=false/nodes=1/conc=8192 which causes CPU overload in the absence of admission control: CPU > 96%, runnable goroutines per cpu > 120, node heartbeat latency > 1s, clock offset +- 100ms. After turning on admission control, runnable goroutines drop to < 40, and cpu utilization to 90-93%, node heartbeat latency ~200ms, clock offset to +- 1ms. Queuing is transferred to the WorkQueue, with p50 queueing latency for KV work at 200ms and KV=>SQL response work at 1.1s. Since the CPU utilization decreases, there is an increase in SQL execution latency since we are leaving more unused CPU. Without further increasing the runnable count, which would defeat the purpose of admission control, we cannot get to a higher utilization. It is likely that this CPU utilization decrease is more pronounced because of the small units of work in the KV workoad Release note (ops change): Node-level admission control that considers the cpu resource is introduced for KV request processing, and response processing (in SQL) for KV responses. This admission control can be enabled using admission.kv.enabled and admission.sql_kv_response.enabled.
- Loading branch information
1 parent
9377527
commit 830485e
Showing
22 changed files
with
1,416 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.