max_subcompactions ignores max_background_jobs
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> 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](https://github.com/facebook/rocksdb/blob/29102641ddf4632bddf34bbd35de9637ea526dee/db/compaction/compaction_job.cc#L712)) for the code that creates new threads for compactions.
### Steps to reproduce the behavior
Contributor guide
Assessment
This issue has not been assessed yet.