For versions of Bitcoin Core after 29.0, common utilities like top
will report higher RAM usage of the bitcoind
process than for previous Bitcoin Core versions.
The size of LevelDB files was increased from 2 MiB to 32 MiB in Bitcoin Core 29.0 (PR #30039). LevelDB caches its on-disk files using mmap
and will cache up to 1000 files by default, although our fork increased this number to 4096 (see https://github.com/bitcoin-core/leveldb-subtree/pull/52). This means that if there is enough available memory, the full chainstate database will be cached.
However this is not memory actually used by the bitcoind
process, only on-disk database files cached for faster future reads. Therefore in case of memory pressure, the host’s kernel will not kill the bitcoind
process but just drop the mmap
pages. To be extra clear: although common utilities will report that Bitcoin Core after 29.0 uses more memory it is not so and it will not lead to OOM.