-
Notifications
You must be signed in to change notification settings - Fork 6.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
max_subcompactions ignores max_background_jobs #9291
Comments
Hey guys, I'm new to the project. How critical is this bug? Is it of a low priority enough for me to use it as my ramp up task into the project? |
Hi, you are welcome to give it a try in the sense that it shouldn't conflict with anyone else's efforts (Jay can correct this if I'm mistaken). I am a bit less sure about its suitability as a ramp-up task, though, as there are a couple tricky aspects we don't have answers to, despite knowing this problem for a long time. One is how to make this change without causing surprise to existing use cases since it will reduce maximum parallelism. Another is how to decide how many subcompactions to split a compaction into within the range [1, max_subcompactions]. The latter problem is difficult because splitting more would reduce parallelism available to other compactions (including ones that we might not know about yet at the time of splitting!). @jay-zhuang may have ideas on the above based on our past discussions. |
Thanks Andrew, any suggestions for a noob ramp up task? |
@briantkim93 Perhaps #7599 could be a good starter task? |
Awesome, thanks @ajkr I'm going to work on it |
Expected behavior
I want max_background_jobs to limit the number of threads used for compactions, flushes and subcompactions.
Actual behavior
max_background_jobs sets the number of threads to use for background compactions and flushes. But these are ignored by subcompactions. With subcompactions, the number of threads per subcompaction is set by max_subcompactions and the total number of threads that can be running at any point is: max_background_jobs * max_subcompactions
(See here) for the code that creates new threads for compactions.
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: