mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::db: Add descriptor field for level0 compaction trigger.
This commit is contained in:
parent
3139050e45
commit
e38825030f
2 changed files with 10 additions and 5 deletions
|
@ -131,4 +131,12 @@ struct ircd::db::descriptor
|
|||
{
|
||||
8192
|
||||
};
|
||||
|
||||
/// The number of level0 files allowed to buffer before compacting. Too
|
||||
/// much data at level0 will slow down queries, but too much compaction
|
||||
/// will increase IOPS for the server with constant reorganization.
|
||||
size_t compaction_trigger
|
||||
{
|
||||
2
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1784,11 +1784,8 @@ ircd::db::database::column::column(database &d,
|
|||
(this->options.max_write_buffer_number * 6):
|
||||
48;
|
||||
|
||||
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;
|
||||
//TODO: bulk ingest/bootstrap: (this->options.max_write_buffer_number * 2):
|
||||
this->options.level0_file_num_compaction_trigger = this->descriptor->compaction_trigger;
|
||||
|
||||
// Universal compaction mode options
|
||||
auto &universal(this->options.compaction_options_universal);
|
||||
|
|
Loading…
Reference in a new issue