-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improvements to OOM protection for Multi-Stage Engine #13955
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
Conversation
Pass tasktype to so that runners can also set the context. Set query id in setupWorker call.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #13955 +/- ##
============================================
- Coverage 61.75% 57.89% -3.87%
- Complexity 207 219 +12
============================================
Files 2436 2612 +176
Lines 133233 143221 +9988
Branches 20636 21988 +1352
============================================
+ Hits 82274 82912 +638
- Misses 44911 53829 +8918
- Partials 6048 6480 +432
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Test failures are unrelated |
| _isThreadSamplingEnabledForMSE = | ||
| config.getProperty(CommonConstants.Accounting.CONFIG_OF_ENABLE_THREAD_SAMPLING_MSE, | ||
| CommonConstants.Accounting.DEFAULT_ENABLE_THREAD_SAMPLING_MSE); | ||
| LOGGER.info("_isThreadSamplingEnabledForMSE: {}", _isThreadSamplingEnabledForMSE); |
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.
nit: I don't think using the attribute name is a good idea. Specially in case it changes in the future. Instead something like: Thread sampling enabled for MSE: true/false
The PR add the following improvements to OOM protection for Multi-Stage Engine.
Add a config parameter to turn off sampling for MSE
pinot.query.scheduler.accounting.enable.thread.sampling.mse.debugSince the feature is new, a debug config has been added to turn off sampling for MSE when there are mixed workloads.
As part of this change, a new fn
Tracing::sampleMSEhas been added to not add anifcondition in the sampling path. The sample function is in the critical path wrt performance and SSE will not be affected by the extra check.Assign query id to workers
Worker threads are not assigned query ids. Refer:
Therefore, the resource used by these threads was not attributed to a query. Now, if there is a
parentContextavailable, the query id is set. During aggregation, memory used by workers is also added to a query's aggregate statistics.Instrument threads for Leaf Stage Operator.
Threads that executed Leaf Stage operators in MSE were not tracked. Now runners and workers are instrumented correctly.
Fix annotations
Nullable/NotNull annotations have been added. The most important is
CPUMemThreadLevelAccountingObjects.::setThreadTaskStatus.Tracing::setupWorkercan pass null forqueryId.tags: bugfix