Skip to content

Commit

Permalink
reduce memtable default size
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Nov 28, 2023
1 parent 6cd4da7 commit ae8c257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions benches/lsmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ fn memtable_point_reads(c: &mut Criterion) {
}

assert_eq!(tree.len().unwrap() as u32, max);
assert_eq!(0, tree.segment_count());

for thread_count in [1_u32, 2, 4, 8] {
group.bench_function(
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct Config {

/// [`MemTable`] maximum size in bytes
///
/// Defaults to 128 MiB
/// Defaults to 64 MiB, like RocksDB
pub(crate) max_memtable_size: u32,

/// Amount of levels of the LSM tree (depth of tree)
Expand Down Expand Up @@ -105,7 +105,7 @@ impl Config {

/// Sets the maximum memtable size
///
/// Defaults to 128 MiB
/// Defaults to 64 MiB, like `RocksDB`
#[must_use]
pub fn max_memtable_size(mut self, bytes: u32) -> Self {
self.max_memtable_size = bytes;
Expand Down

0 comments on commit ae8c257

Please sign in to comment.