Performance: Increase default dbcache to 2048MB, reduce checkblocks to 24, increase checklevel to 2

Changes improve sync speed without changing consensus:
- dbcache: 128MB → 2048MB (better caching during sync)
- checkblocks: 2500 → 24 (faster startup validation)
- checklevel: 1 → 2 (lighter verification during sync)

These changes make the node faster to sync and restart while maintaining
security and consensus compatibility.
This commit is contained in:
Krystie
2026-03-19 07:30:29 +01:00
parent 47bd5bf083
commit 0beca5d801
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ bool CDBEnv::Open(fs::path pathEnv_)
if (GetBoolArg("-privdb", true))
nEnvFlags |= DB_PRIVATE;
int nDbCache = GetArg("-dbcache", 128);
int nDbCache = GetArg("-dbcache", 2048);
dbenv.set_lg_dir(pathLogDir.string().c_str());
dbenv.set_cachesize(nDbCache / 1024, (nDbCache % 1024)*1048576, 1);
dbenv.set_lg_bsize(1048576);