Merge bitcoin/bitcoin#34692: Bump dbcache to 1 GiB

4ae9a10ada doc: add release notes for dbcache bump (Andrew Toth)
c510d126ef doc: update dbcache default in reduce-memory.md (Andrew Toth)
027cac8527 qt: show GetDefaultDBCache() in settings (Andrew Toth)
5b34f25184 dbcache: bump default from 450MB -> 1024MB if enough memory (Andrew Toth)

Pull request description:

  Alternative to #34641

  This increases the default `dbcache` value from `450MiB` to `1024MiB` if:
  - `dbcache` is unset
  - The system is 64 bit
  - At least 4GiB of RAM is detected

  Otherwise fallback to previous `450MiB` default.

  This should be simple enough to get into v31. The bump to 1GiB shows significant performance increases in #34641. It also alleviates concerns of too high default for steady state, and of lowering the current dbcache for systems with less RAM.

  This change only changes bitcoind behavior, while kernel still defaults to 450 MiB.

ACKs for top commit:
  ajtowns:
    ACK 4ae9a10ada
  kevkevinpal:
    reACK [4ae9a10](4ae9a10ada)
  svanstaa:
    ACK [4ae9a10](4ae9a10ada)
  achow101:
    ACK 4ae9a10ada
  sipa:
    ACK 4ae9a10ada

Tree-SHA512: ee3acf1fb08523ac80e37ec8f0caca226ffde6667f3a75ae6f4f4f54bc905a883ebcf1bf0e8a8a15c7cfabff96c23225825b3fff4506b9ab9936bf2c0a2c2513
This commit is contained in:
Ava Chow
2026-03-06 12:07:41 -08:00
6 changed files with 25 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ There are a few parameters that can be dialed down to reduce the memory usage of
The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these will usually have a negative effect on performance.
- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450`. The unit is MiB (1024).
- `-dbcache=<n>` - the UTXO database cache size, this defaults to `1024` (or `450` if less than `4096` MiB system RAM is detected). The unit is MiB (1024).
- The minimum value for `-dbcache` is 4.
- A lower `-dbcache` makes initial sync time much longer. After the initial sync, the effect is less pronounced for most use-cases, unless fast validation of blocks is important, such as for mining.

View File

@@ -0,0 +1,6 @@
## Updated settings
- The default `-dbcache` value has been increased to `1024` MiB from `450` MiB
on systems where at least `4096` MiB of RAM is detected.
This is a performance increase, but will use more memory.
To maintain the previous behaviour, set `-dbcache=450`.