Higher reported memory usage of Bitcoin Core after version 29 #33351

issue darosior openend this issue on September 9, 2025
  1. darosior commented at 4:53 pm on September 9, 2025: member

    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.

  2. fanquake added the label Resource usage on Sep 10, 2025
  3. Raimo33 commented at 12:44 pm on September 10, 2025: none
    looks like a top issue to me.
  4. sipa commented at 12:48 pm on September 10, 2025: member

    Yeah, it’s just a reporting issue.

    The behavior is largely unchanged: the OS will cache disk content in memory regardless if there is a spare physical memory. The difference is that with (more) mmap’ed content, that memory usage will be accounted for by the process itself as shared memory, while otherwise it’ll be accounted for as kernel disk cache memory.

  5. darosior commented at 1:37 pm on September 10, 2025: member
    Yes this issue is intended for documentation purpose, in case someone looking up for “bitcoind higher memory usage” on the tracker or a search engine.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-09-19 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me