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.
  6. tyuxar commented at 4:32 pm on October 1, 2025: none

    It is not just a reporting issue, there is a problem with the memory use of v29.

    I’ve been running Core in a FreeBSD jail for quite a long time (it’s at 14.3p4 right now) and has been using the binary pkg.

    v28 used at most approximately 1-1.5 GB, but usually it was hovering around 6-800 MB RSS.

    v29 went up to slightly over 3GB shortly after startup, and remained there for 24+ hours. This is RSS! The virtual size was 12+ GB (I assume b/c of the mentioned LevelDB memory mapping).

    As I’m running it on a fairly low powered x86 system (APU2) with only 4 GB RAM, it became quite annoying (it’s not the only workload on the server).


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-10-10 15:13 UTC

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