perf: Speed up VersionedIntervalTimeline operations#19278
Draft
jtuglu1 wants to merge 1 commit intoapache:masterfrom
Draft
perf: Speed up VersionedIntervalTimeline operations#19278jtuglu1 wants to merge 1 commit intoapache:masterfrom
jtuglu1 wants to merge 1 commit intoapache:masterfrom
Conversation
585c258 to
dc73607
Compare
dc73607 to
cc6d8a1
Compare
cc6d8a1 to
19e327a
Compare
Contributor
Author
|
I think #19138 could solve this problem more cleanly. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We have observed severe performance degradation in the VersionedIntervalTimeline when ingesting datasource at the
MINUTEsegment grain. Due to query runners needing to acquire an exclusive lock here on the query hot-path, if frequent segment add/remove callbacks that touch many intervals occur, the volume + latency of each of these timeline operations can cause the BrokerServerView lock to stall indefinitely, preventing queries from running. This giant lock in BrokerServerView is IMO another issue that should be dealt with in a separate change (at the very least, should change this lock granularity to per-datasource).This patch speeds up a few timeline operations to significantly increase timeline throughput to minimize contention on the BrokerServerView lock.
Results
Params:
numInitialRootGenSegmentsPerInterval=10,numNonRootGenerations=1,useSegmentLock=falsebenchLookup
benchRemoveWithReplacement
Release note
Speed up VersionedIntervalTimeline operations
This PR has: