Split out of #30611 (comment)
Setting a large -dbcache
size postpones the index writes until the coins cache size exceeds the specified limit. This causes the final flush after manual termination to seemingly hang forever (e.g. tens of minutes for 20 GiB); Now that the dbcache
upper cap has been lifted, this will become even more apparent, so a warning will be shown when large UTXO sets are flushed (currently >1 GiB), such as:
2024-12-18T18:25:03Z Flushed fee estimates to fee_estimates.dat. 2024-12-18T18:25:03Z [warning] Flushing large 1 GiB UTXO set to disk may take several minutes. 2024-12-18T18:25:09Z Shutdown: done
You can reproduce it by starting bitcoind
with a large -dbcache
:
mkdir demo && cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake –build build -j$(nproc) && build/src/bitcoind -datadir=demo -dbcache=10000
Waiting until the used memory is over 1 GiB
2024-12-18T18:25:02Z UpdateTip: […] progress=0.069009 cache=1181.1MiB(8827981txo)
And cancelling the process from the terminal:
^C2024-12-18T18:25:03Z tor: Thread interrupt […] 2024-12-18T18:25:03Z [warning] Flushing large 1 GiB UTXO set to disk may take several minutes.