From b6f8c48946cbfceb066de660c485ae1bd2c27cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Wed, 27 Aug 2025 21:24:51 -0700 Subject: [PATCH] coins: increase default `dbbatchsize` to 32 MiB The default database write batch size is increased from 16 MiB to 32 MiB to improve I/O efficiency and performance during UTXO flushes, particularly during Initial Block Download and `assumeutxo` loads. On systems with slower I/O, a larger batch size reduces overhead from numerous small writes. Measurements show this change provides a modest performance improvement on most hardware during a critical section, with a minimal peak memory increase (approx. 75 MiB on default settings). --- src/kernel/caches.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/caches.h b/src/kernel/caches.h index 63bb44c54b5..aa3214e5df7 100644 --- a/src/kernel/caches.h +++ b/src/kernel/caches.h @@ -12,7 +12,7 @@ //! Suggested default amount of cache reserved for the kernel (bytes) static constexpr size_t DEFAULT_KERNEL_CACHE{450_MiB}; //! Default LevelDB write batch size -static constexpr size_t DEFAULT_DB_CACHE_BATCH{16_MiB}; +static constexpr size_t DEFAULT_DB_CACHE_BATCH{32_MiB}; //! Max memory allocated to block tree DB specific cache (bytes) static constexpr size_t MAX_BLOCK_DB_CACHE{2_MiB};