bitcoin-knots: raise dbcache from 200 to 1200

Tried on 2026-10-18 to cut the HDD reads: at 200 MB the P2P thread alone read
~4 MB/s validating relayed transactions. Steady-state reads did drop (to
~0.4 MB/s) and RPC rejections went to zero.

But block validation got SLOWER over the next 14 blocks: median 60s against
11s before. bitcoind's bench log puts all of it in input lookups at ~5 ms
each. The likely cause is that the extra GB came out of the guest's page
cache, which holds compressed chainstate files far more densely than
bitcoind's cache holds decoded coins. Committed because it is what is
running; probably to be reverted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
counterweight 2026-10-19 22:10:25 +02:00
parent 2a80f0e3ca
commit d50774c39a
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -69,11 +69,17 @@ healthcheck_push_token: ""
bitcoin_logfile: "{{ bitcoin_data_dir }}/debug.log"
# --- dbcache ----------------------------------------------------------------
# Computed as 90% of RAM unless this is set. The live node was hand-tuned to
# 200 MB; the calculation would have produced 3528. As with fulcrum, note that
# Computed as 90% of RAM unless this is set. As with fulcrum, note that
# set_fact outranks role defaults, so the CALCULATION has to honour this - a
# value pinned only in defaults/ is silently ignored.
bitcoin_dbcache_mb_override: 200
#
# 1200, raised from a hand-tuned 200 on 2026-10-18. At 200 MB almost no UTXO
# lookup hit memory: the P2P thread alone read ~4 MB/s off the saturated HDD
# mirror validating relayed transactions, and block validation took a median
# 11 s, p90 103 s, max 344 s - long enough for RPC to stall and the health
# probe to fail. 1200 is what fits in the 4 GB VM (bitcoind ~1.5 GB RSS at
# 200, mempool ~3 MB in practice). Raising the VM to 6 GB would allow ~3000.
bitcoin_dbcache_mb_override: 1200
# --- DATUM Gateway ----------------------------------------------------------
# This node feeds block templates to datum_gateway on knots-box. These settings