HomePhabricator

validation: don't clear cache on periodic flush

Description

validation: don't clear cache on periodic flush

Summary:

Since core#17487 (D16162) we no longer need to clear the coins cache when syncing to disk. A warm coins cache significantly speeds up block connection, and only needs to be fully flushed when nearing the dbcache limit.

Periodic flushes occur every 24 hours, which empties the cache and causes block connection to slow down. By keeping the cache through periodic flushes a node can run for several days with an increasingly hotter cache and connect blocks much more quickly. Now not only can setting a higher dbcache value be beneficial for IBD, it can also be beneficial for connecting blocks faster.

This is a backport of core#28233

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Andrew Toth <andrewstoth@gmail.com>Authored on Aug 17 2023, 20:17
PiRKCommitted on Sep 9 2025, 15:28
PiRKPushed on Sep 9 2025, 15:28
Reviewer
Restricted Project
Differential Revision
D18575: validation: don't clear cache on periodic flush
Parents
rABCc45f940bc64d: [metachronik] Simplify reconciliations
Branches
Unknown
Tags
Unknown