From ea68ccdda1017cdffaa17166147dbb8e250ca536 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 11 Jul 2022 15:08:17 -0700 Subject: [PATCH] ircd::db: Use lower level0 compaction trigger to reduce read amp. --- ircd/db_database.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ircd/db_database.cc b/ircd/db_database.cc index 131092243..808cb1b9a 100644 --- a/ircd/db_database.cc +++ b/ircd/db_database.cc @@ -1784,10 +1784,11 @@ ircd::db::database::column::column(database &d, (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): - 4; + this->options.level0_file_num_compaction_trigger = 2; + //TODO: for bulk ingest/bootstrap: + // this->options.compaction_style == rocksdb::kCompactionStyleUniversal? + // (this->options.max_write_buffer_number * 2): + // 4; // Universal compaction mode options auto &universal(this->options.compaction_options_universal);