From 0ea11c1a0e7523f30f1ffa90b8fdd7535a8c5a6f Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Wed, 4 Feb 2026 00:02:23 -0600 Subject: [PATCH] runners: Bumped default crystal_thresh BLOCK_SIZE/8 -> BLOCK_SIZE/16 This has been adopted in external benchmarks for a while, as it manages to push sequential write performance into a much better region of the diminishing-returns curve. But hey! Don't take my word for it, let's see the results from our new bench_runner for the first time: NOR throughput cs=1/8 cs=1/16 bench_wt_seq+write 15180.0 29402.6 (+93.7%) bench_wt_random+write 876.2 957.3 (+9.3%) bench_wt_logging+write 2001.0 2153.4 (+7.6%) bench_wt_many+write 453.6 453.6 (+0.0%) NAND throughput cs=1/8 cs=1/16 bench_wt_seq+write 21778.7 22330.1 (+2.5%) bench_wt_random+write 3583.0 3637.2 (+1.5%) bench_wt_logging+write 10855.1 10977.1 (+1.1%) bench_wt_many+write 68.2 68.2 (+0.0%) Though this doesn't really capture the tradeoffs related to file tails, storage usage, etc. In theory sequential writes are happy to start crystallizing as soon as any data is written, but this leads to significant waste anytime you're not going to write most of a block. --- runners/bench_defines.h | 4 ++-- runners/test_defines.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runners/bench_defines.h b/runners/bench_defines.h index 8f30bc8b..ec455c28 100644 --- a/runners/bench_defines.h +++ b/runners/bench_defines.h @@ -32,8 +32,8 @@ BENCH_DEFINE(GC_PREERASE_COUNT, -1 ) BENCH_DEFINE(GC_COMPACT_THRESH, 0 ) BENCH_DEFINE(SHRUB_SIZE, BLOCK_SIZE/4 ) - BENCH_DEFINE(FRAGMENT_SIZE, LFS3_MIN(BLOCK_SIZE/8, 512) ) - BENCH_DEFINE(CRYSTAL_THRESH, BLOCK_SIZE/8 ) + BENCH_DEFINE(FRAGMENT_SIZE, LFS3_MIN(BLOCK_SIZE/16, 512) ) + BENCH_DEFINE(CRYSTAL_THRESH, BLOCK_SIZE/16 ) BENCH_DEFINE(LOOKGBMAP_THRESH, BLOCK_COUNT/4 ) // don't bother simulating erases, this may be less realistic, but // it's certainly faster! diff --git a/runners/test_defines.h b/runners/test_defines.h index 1d8267d5..4ae510b3 100644 --- a/runners/test_defines.h +++ b/runners/test_defines.h @@ -23,8 +23,8 @@ TEST_DEFINE(GC_PREERASE_COUNT, -1 ) TEST_DEFINE(GC_COMPACT_THRESH, 0 ) TEST_DEFINE(SHRUB_SIZE, BLOCK_SIZE/4 ) - TEST_DEFINE(FRAGMENT_SIZE, LFS3_MIN(BLOCK_SIZE/8, 512) ) - TEST_DEFINE(CRYSTAL_THRESH, BLOCK_SIZE/8 ) + TEST_DEFINE(FRAGMENT_SIZE, LFS3_MIN(BLOCK_SIZE/16, 512) ) + TEST_DEFINE(CRYSTAL_THRESH, BLOCK_SIZE/16 ) TEST_DEFINE(LOOKGBMAP_THRESH, BLOCK_COUNT/4 ) TEST_DEFINE(ERASE_VALUE, 0xff ) #ifndef TEST_KIWIBD