From a568ab628e598a84cf378c7c7dff210003cfbd61 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 9 Jul 2026 06:59:25 +0200 Subject: [PATCH] tune: raise adaptive dbcache ceiling to 64 GiB on 64-bit hosts nMaxDbCache capped the adaptive UTXO/db cache (and a manual -dbcache) at 16 GiB, so the help's "uses most of free RAM" was false above ~20 GB of RAM. Raise the 64-bit ceiling to 64 GiB. The adaptive controller + its RAM reserve still bound actual usage and shrink under memory pressure, and small hosts are unaffected -- the ceiling only binds once RAM-minus- reserve exceeds it. The coins cache grows lazily to the target, so nothing is pre-allocated. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/txdb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/txdb.h b/src/txdb.h index cc01a7395..c5189242a 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -52,7 +52,7 @@ class uint256; //! -dbcache default (MiB) static const int64_t nDefaultDbCache = 512; //! max. -dbcache (MiB) -static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024; +static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 65536 : 1024; // 64 GiB ceiling on 64-bit so adaptive dbcache can use most of RAM on large hosts (was 16384) //! min. -dbcache in (MiB) static const int64_t nMinDbCache = 4;