Skip to content
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

Open
mdcallag opened this issue Dec 13, 2021 · 5 comments
Open

max_subcompactions ignores max_background_jobs #9291

mdcallag opened this issue Dec 13, 2021 · 5 comments
Labels

Comments

@mdcallag
Copy link
Contributor

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

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

@ajkr ajkr added the up-for-grabs Up for grabs label Dec 21, 2021
@briantkim93
Copy link

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?

@ajkr
Copy link
Contributor

ajkr commented Jan 8, 2022

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.

@briantkim93
Copy link

Thanks Andrew, any suggestions for a noob ramp up task?

@ajkr
Copy link
Contributor

ajkr commented Jan 12, 2022

@briantkim93 Perhaps #7599 could be a good starter task?

@briantkim93
Copy link

Awesome, thanks @ajkr I'm going to work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants