-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
VersionedIntervalTimeline.isOvershadowed is very slow when processing many segments #11700
Comments
do you have a lot of segments in a single interval? The |
@abhishekagarwal87 Yes. There are about 20,000 segments in a single interval. |
@abhishekagarwal87 Does it help to replace for loop with Iterators.all? |
How will that help? As long as the number of computations/ops is the same, the time taken won't change much. |
@abhishekagarwal87 You're right! Thanks for your quick reply! |
The current design assumes that there won't be too many segments in each time chunk. The number of "too many segments" can be defined differently based on your machine spec, but, a rule of thumb is less than 2k. The workaround can depend on why you have such many segments. If you have a lot of small segments, you can use auto compaction to merge them (https://support.imply.io/hc/en-us/articles/360055221054-How-to-set-the-auto-compaction-config-in-the-Druid-console). If you do have large segments of 20k, you can repartition your datasource with a smaller segment granularity. For example, if your datasource is currently daily-partitioned, you can repartition it to be hourly-partitioned. The auto compaction can help with switching segment granularity as well, but it started supporting segment granularity recently, so please check Druid docs to see if auto compaction supports segment granularity in your Druid version. |
@jihoonson Thank you for your explanation and advice! Our data volume is too large, we need to keep it to be daily-partitioned in order to save more disks. Now the Coordinator has been downgraded to 0.13 and the problem is gone (We are not using compaction yet ). |
The main issue of high runtime of The fix looks only at the segments that have already been identified to be overshadowed by the timeline, rather than iterating over all the used segments. |
Affected Version
0.18.1
Description
There are millions segments in our Druid cluster. Coordinator is very slow when processing duties. After generating the flame chart, we found that VersionedIntervalTimeline.isOvershadowed has poor performance.
But when we read the code according to the above call stack, we get confused about why DataSegment.includeRootPartitions cost so much time (A large part of the top of the flame chart is blank).
The text was updated successfully, but these errors were encountered: