HomePhabricator

[IBD] coins: increase default UTXO flush batch size to 32 MiB

Description

[IBD] coins: increase default UTXO flush batch size to 32 MiB

Summary:
The constant for the default batch size is moved to kernel/caches.h to consolidate kernel-related cache constants.

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).
This is a backport of core#31645

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D18987

Details

Provenance
Lőrinc <pap.lorinc@gmail.com>Authored on Aug 28 2025, 04:20
PiRKCommitted on Mon, Nov 24, 08:58
PiRKPushed on Mon, Nov 24, 08:58
Reviewer
Restricted Project
Differential Revision
D18987: [IBD] coins: increase default UTXO flush batch size to 32 MiB
Parents
rABCe2831d3d5f30: txpool: add a fast path in TxPool::EraseForBlock when the pool is empty
Branches
Unknown
Tags
Unknown