From a61907e5d9c1988eb1e018cae5831d6b94f4da7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rinc?= Date: Mon, 2 Mar 2026 12:20:22 +0000 Subject: [PATCH] doc: explain swapping in `reduce-memory.md` Document what swapping is and why it can severely degrade `bitcoind` performance. --- doc/reduce-memory.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/reduce-memory.md b/doc/reduce-memory.md index cac5dc982d1..e3ab3bad67b 100644 --- a/doc/reduce-memory.md +++ b/doc/reduce-memory.md @@ -2,6 +2,15 @@ There are a few parameters that can be dialed down to reduce the memory usage of `bitcoind`. This can be useful on embedded systems or small VPSes. +## Swapping + +When the operating system is under memory pressure, it may swap memory pages from RAM to disk. +If this becomes continuous ("thrashing"), `bitcoind` can slow to a crawl, especially during initial sync or reindex. + +If you see sustained swap I/O while `bitcoind` runs, restart with a lower `-dbcache`. +If needed, also reduce `-maxmempool`, `-maxconnections`, or use `-blocksonly`. +Bitcoin Core may warn at startup when `-dbcache` looks too large for the detected system memory. + ## In-memory caches 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.