-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add server level dynamically configurable segment download throttler #15001
base: master
Are you sure you want to change the base?
Add server level dynamically configurable segment download throttler #15001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the download throttling is on each table. Not introduced in this PR, but that is wrong. The semaphore needs to be passed from outside so that it can be shared across all tables.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15001 +/- ##
============================================
+ Coverage 61.75% 63.69% +1.94%
- Complexity 207 1482 +1275
============================================
Files 2436 2728 +292
Lines 133233 152480 +19247
Branches 20636 23569 +2933
============================================
+ Hits 82274 97119 +14845
- Misses 44911 48044 +3133
- Partials 6048 7317 +1269
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I think the original intention of this semaphore was to be a separate semaphore for each table (e.g. see the comments and docs related to this) itself, and passing it from outside as a shared semaphore across all tables will result in a big behavior change. For now I would like to keep the overall functionality the same. We can open an issue for consolidating these under a single semaphore or treating these as per table overridable configs perhaps (which was another idea I had discussed with @klsince). What do you think @Jackie-Jiang? Reference PR of original change: #8694 Edit: Capturing discussion on original intent of the table level config:
|
5de67e3
to
0a49709
Compare
This PR adds a new server level dynamically configurable throttler for segment downloads to reduce the impact of resource exhaustion on the servers (disk, CPU, memory). This throttler is used for both deep store and peer downloads. Uses the same mechanism introduced in #14894 for allowing dynamic config updates.
The above config is meant to work with the existing table level config:
pinot.server.instance.table.level.max.parallel.segment.downloads
for deep store downloads. The table level semaphore will be taken first, followed by the server level semaphore. The table level semaphore is meant to ensure there is no starvation among the tables in the situation where a large number of segments are suddenly added / updated for a single table. The server level semaphore is meant to ensure the server is protected from too many resources getting used up for download.This PR also renames the
SegmentPreprocessThrottler
toSegmentOperationsThrottler
as the newly addedSegmentDownloadThrottler
is no longer only preprocess related.Lock ordering for deep store downloads:
Disabling throttling:
The upper bound on threads that can be downloading segment is always going to be limited to:
STATE_TRANSITIONS.maxThreads + min(USER_DEFINE_MSG.maxThreads, max.parallel.refresh.threads)
OSS Helix defaults
STATE_TRANSITIONS.maxThreads
andUSER_DEFINE_MSG.maxThreads
to 40.cc @Jackie-Jiang @klsince @npawar @jackjlli @jasperjiaguo @vvivekiyer