Skip to content

Commit 1301e82

Browse files
authored
refactor: increase default foyer flushers to 4 (#80)
Signed-off-by: MrCroxx <mrcroxx@outlook.com>
1 parent ced589e commit 1301e82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/core/src/engine.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use crate::num_cpus;
3737

3838
const DEFAULT_MEMORY_CAPACITY_FACTOR: f64 = 0.5; // 50% of available memory
3939
const DEFAULT_BLOCK_SIZE: usize = 64 * 1024 * 1024; // 64 MiB
40+
const DEFAULT_FLUSHERS: usize = 4; // Number of flushers for the block engine
4041

4142
#[derive(Debug, Error)]
4243
#[error("{0}")]
@@ -85,7 +86,11 @@ impl FoyerEngine {
8586
.with_shards(parallelism)
8687
.with_eviction_config(FifoConfig::default())
8788
.storage()
88-
.with_engine_config(BlockEngineBuilder::new(dev).with_block_size(DEFAULT_BLOCK_SIZE))
89+
.with_engine_config(
90+
BlockEngineBuilder::new(dev)
91+
.with_block_size(DEFAULT_BLOCK_SIZE)
92+
.with_flushers(DEFAULT_FLUSHERS),
93+
)
8994
.with_io_engine(
9095
PsyncIoEngineBuilder::new()
9196
.build()

0 commit comments

Comments
 (0)