rocksdb/options
Baptiste Lemaire 4361d6d163 Add simple heuristics for experimental mempurge. (#8583)
Summary:
Add `experimental_mempurge_policy` option flag and introduce two new `MemPurge` (Memtable Garbage Collection) policies: 'ALWAYS' and 'ALTERNATE'. Default value: ALTERNATE.
`ALWAYS`: every flush will first go through a `MemPurge` process. If the output is too big to fit into a single memtable, then the mempurge is aborted and a regular flush process carries on. `ALWAYS` is designed for user that need to reduce the number of L0 SST file created to a strict minimum, and can afford a small dent in performance (possibly hits to CPU usage, read efficiency, and maximum burst write throughput).
`ALTERNATE`: a flush is transformed into a `MemPurge` except if one of the memtables being flushed is the product of a previous `MemPurge`. `ALTERNATE` is a good tradeoff between reduction in number of L0 SST files created and performance. `ALTERNATE` perform particularly well for completely random garbage ratios, or garbage ratios anywhere in (0%,50%], and even higher when there is a wild variability in garbage ratios.
This PR also includes support for `experimental_mempurge_policy` in `db_bench`.
Testing was done locally by replacing all the `MemPurge` policies of the unit tests with `ALTERNATE`, as well as local testing with `db_crashtest.py` `whitebox` and `blackbox`. Overall, if an `ALWAYS` mempurge policy passes the tests, there is no reasons why an `ALTERNATE` policy would fail, and therefore the mempurge policy was set to `ALWAYS` for all mempurge unit tests.

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

Reviewed By: pdillinger

Differential Revision: D29888050

Pulled By: bjlemaire

fbshipit-source-id: e2cf26646d66679f6f5fb29842624615610759c1
2021-07-26 11:56:29 -07:00
..
cf_options.cc Fix Immutable Customizable Serialization (#8457) 2021-06-28 12:28:28 -07:00
cf_options.h Added static methods for simple types to OptionTypeInfo (#8249) 2021-05-11 16:15:47 -07:00
configurable_helper.h Add customizable_util.h to the public API (#8301) 2021-06-29 09:08:57 -07:00
configurable_test.cc Move RegisterOptions into the Configurable API (#8223) 2021-04-26 03:13:24 -07:00
configurable_test.h Move RegisterOptions into the Configurable API (#8223) 2021-04-26 03:13:24 -07:00
configurable.cc Allow CreateFromString to work on complex URIs (#8547) 2021-07-16 15:05:45 -07:00
customizable_test.cc Allow CreateFromString to work on complex URIs (#8547) 2021-07-16 15:05:45 -07:00
customizable.cc Fix PrepareOptions for Customizable Classes (#8468) 2021-06-30 14:09:36 -07:00
db_options.cc Add simple heuristics for experimental mempurge. (#8583) 2021-07-26 11:56:29 -07:00
db_options.h Add simple heuristics for experimental mempurge. (#8583) 2021-07-26 11:56:29 -07:00
options_helper.cc Allow CreateFromString to work on complex URIs (#8547) 2021-07-16 15:05:45 -07:00
options_helper.h Added static methods for simple types to OptionTypeInfo (#8249) 2021-05-11 16:15:47 -07:00
options_parser.cc Refactor: add LineFileReader and Status::MustCheck (#8026) 2021-03-09 20:12:38 -08:00
options_parser.h Bring the Configurable options together (#5753) 2020-09-14 17:01:01 -07:00
options_settable_test.cc Cache warming data blocks during flush (#8242) 2021-06-17 21:56:47 -07:00
options_test.cc Memtable "MemPurge" prototype (#8454) 2021-07-02 05:23:02 -07:00
options.cc Limit buffering for collecting samples for compression dictionary (#7970) 2021-02-19 14:09:54 -08:00