mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::db: Variable per-column write buffer derived from block size.
This commit is contained in:
parent
38a6a1049d
commit
ed01ed05dc
1 changed files with 13 additions and 1 deletions
14
ircd/db.cc
14
ircd/db.cc
|
@ -2075,8 +2075,20 @@ ircd::db::database::column::column(database &d,
|
|||
//this->options.bottommost_compression_opts = this->options.compression_opts;
|
||||
|
||||
//TODO: descriptor / conf
|
||||
static const auto write_buffer_blocks{2048L};
|
||||
static const long write_buffer_size_minmax[]
|
||||
{
|
||||
256_KiB, 4_MiB
|
||||
};
|
||||
|
||||
// Derive the write buffer size from the block size
|
||||
this->options.write_buffer_size = std::clamp
|
||||
(
|
||||
write_buffer_blocks * long(this->descriptor->block_size),
|
||||
write_buffer_size_minmax[0],
|
||||
write_buffer_size_minmax[1]
|
||||
);
|
||||
|
||||
this->options.write_buffer_size = 1_MiB;
|
||||
this->options.max_write_buffer_number = 16;
|
||||
this->options.min_write_buffer_number_to_merge = 2;
|
||||
this->options.max_write_buffer_number_to_maintain = 8;
|
||||
|
|
Loading…
Reference in a new issue