AC has an existing pacing mechanism in admission.Pacer that can be used to throttle long running elastic CPU work (currently used for ExportRequest, TTL reads, rangefeed/changefeed initial and catchup scans). This seems like the right mechanism to use here. It can cause arbitrary delays, so it won't necessarily play well with timeouts at a higher layer -- I don't have enough understanding of the code surrounding importer.ingestKvs and importer.workloadReader.readFiles to know the pitfalls.
(See the discussion in https://cockroachlabs.slack.com/archives/C01SRKWGHG8/p1701364715878499?thread_ts=1701013647.475009&cid=C01SRKWGHG8)
importer.workloadReader.readFiles
andbulk.BufferingAdder
, neither of which integrate with AC, were consuming 31% of the cpu on this node, which affected other user-facing queries.AC has an existing pacing mechanism in
admission.Pacer
that can be used to throttle long running elastic CPU work (currently used for ExportRequest, TTL reads, rangefeed/changefeed initial and catchup scans). This seems like the right mechanism to use here. It can cause arbitrary delays, so it won't necessarily play well with timeouts at a higher layer -- I don't have enough understanding of the code surroundingimporter.ingestKvs
andimporter.workloadReader.readFiles
to know the pitfalls.@yuzefovich @dt
Jira issue: CRDB-34026