0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd::db: Use computed level0 triggers; indicate rocksdb invariant from warnlog.

This commit is contained in:
Jason Volk 2020-12-20 20:52:49 -08:00
parent 510b8d4aad
commit d884757155

View file

@ -1733,8 +1733,19 @@ ircd::db::database::column::column(database &d,
rocksdb::CompactionPri::kOldestLargestSeqFirst:
rocksdb::CompactionPri::kOldestLargestSeqFirst;
this->options.level0_stop_writes_trigger = 64;
this->options.level0_slowdown_writes_trigger = 48;
// RocksDB sez:
// stop_writes_trigger >= slowdown_writes_trigger >= file_num_compaction_trigger
this->options.level0_stop_writes_trigger =
this->options.compaction_style == rocksdb::kCompactionStyleUniversal?
(this->options.max_write_buffer_number * 8):
64;
this->options.level0_slowdown_writes_trigger =
this->options.compaction_style == rocksdb::kCompactionStyleUniversal?
(this->options.max_write_buffer_number * 6):
48;
this->options.level0_file_num_compaction_trigger =
this->options.compaction_style == rocksdb::kCompactionStyleUniversal?
(this->options.max_write_buffer_number * 2):