rocksdb/options
sdong c66b4429ff Incremental Space Amp Compactions in Universal Style (#8655)
Summary:
This commit introduces incremental compaction in univeral style for space amplification. This follows the first improvement mentioned in https://rocksdb.org/blog/2021/04/12/universal-improvements.html . The implemention simply picks up files about size of max_compaction_bytes to compact and execute if the penalty is not too big. More optimizations can be done in the future, e.g. prioritizing between this compaction and other types. But for now, the feature is supposed to be functional and can often reduce frequency of full compactions, although it can introduce penalty.

In order to add cut files more efficiently so that more files from upper levels can be included, SST file cutting threshold (for current file + overlapping parent level files) is set to 1.5X of target file size. A 2MB target file size will generate files like this: https://gist.github.com/siying/29d2676fba417404f3c95e6c013c7de8 Number of files indeed increases but it is not out of control.

Two set of write benchmarks are run:
1. For ingestion rate limited scenario, we can see full compaction is mostly eliminated: https://gist.github.com/siying/959bc1186066906831cf4c808d6e0a19 . The write amp increased from 7.7 to 9.4, as expected. After applying file cutting, the number is improved to 8.9. In another benchmark, the write amp is even better with the incremental approach: https://gist.github.com/siying/d1c16c286d7c59c4d7bba718ca198163
2. For ingestion rate unlimited scenario, incremental compaction turns out to be too expensive most of the time and is not executed, as expected.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/8655

Test Plan: Add unit tests to the functionality.

Reviewed By: ajkr

Differential Revision: D31787034

fbshipit-source-id: ce813e63b15a61d5a56e97bf8902a1b28e011beb
2021-10-20 10:04:13 -07:00
..
cf_options.cc Incremental Space Amp Compactions in Universal Style (#8655) 2021-10-20 10:04:13 -07:00
cf_options.h Make it possible to force the garbage collection of the oldest blob files (#8994) 2021-10-11 18:03:01 -07:00
configurable_helper.h Fix some minor issues in the Customizable infrastructure (#8566) 2021-08-19 10:10:47 -07:00
configurable_test.cc Make Configurable/Customizable options copyable (#8704) 2021-08-25 17:48:08 -07:00
configurable_test.h Move RegisterOptions into the Configurable API (#8223) 2021-04-26 03:13:24 -07:00
configurable.cc Make Configurable/Customizable options copyable (#8704) 2021-08-25 17:48:08 -07:00
customizable_test.cc Allow unregistered options to be ignored in DBOptions from files (#9045) 2021-10-19 10:43:04 -07:00
customizable.cc Add support to the ObjectRegistry for ManagedObjects (#8658) 2021-09-10 05:21:04 -07:00
db_options.cc Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050) 2021-10-19 15:54:23 -07:00
db_options.h Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050) 2021-10-19 15:54:23 -07:00
options_helper.cc Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050) 2021-10-19 15:54:23 -07:00
options_helper.h Allow unregistered options to be ignored in DBOptions from files (#9045) 2021-10-19 10:43:04 -07:00
options_parser.cc Allow unregistered options to be ignored in DBOptions from files (#9045) 2021-10-19 10:43:04 -07:00
options_parser.h Bring the Configurable options together (#5753) 2020-09-14 17:01:01 -07:00
options_settable_test.cc Add lowest_used_cache_tier to ImmutableDBOptions to enable or disable Secondary Cache (#9050) 2021-10-19 15:54:23 -07:00
options_test.cc Allow unregistered options to be ignored in DBOptions from files (#9045) 2021-10-19 10:43:04 -07:00
options.cc Make it possible to force the garbage collection of the oldest blob files (#8994) 2021-10-11 18:03:01 -07:00