This guide explains Bitcoin Core getmemoryinfo RPC in plain English. It shows what the command does, what its result means and what it cannot prove.
TL;DR
- What it is: Bitcoin Core 0.16.0 getmemoryinfo returned information about the daemon’s locked-memory manager in its default stats mode. It reported used, free and total bytes, the amount successfully locked and allocated or free chunk counts.
- Why it matters: getmemoryinfo is most valuable for confirming sensitive-memory locking and allocator behaviour. It must be combined with host telemetry and handled as potentially sensitive diagnostic evidence.
- Current position: Bitcoin Core 0.16.0 getmemoryinfo returned information about the daemon’s locked-memory manager in its default stats mode.
Bitcoin Core getmemoryinfo RPC in simple English
Bitcoin Core getmemoryinfo RPC: Default stats describes the locked-memory manager, not resident set size, database cache, mempool or operating-system pressure.
Simple example
A node operator is checking Bitcoin Core getmemoryinfo RPC. Compare with host telemetry before diagnosing an out-of-memory condition. Compare identical workloads and version-pinned builds before calling an increase a memory leak.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
Stats mode scope
Default stats describes the locked-memory manager, not resident set size, database cache, mempool or operating-system pressure. Used and free refer to current arenas and total is their managed sum. Compare with host telemetry before diagnosing an out-of-memory condition.
Locked versus total
The locked field records bytes successfully locked against swapping. If it is smaller than total, locking failed at some point and key-related data could have been swapped to disk. Treat the mismatch as a security and host-configuration signal requiring investigation, not proof that a key leaked.
Chunk counters
chunks_used and chunks_free describe allocator blocks within the managed arenas. Trends can help identify fragmentation or lifecycle changes, but counts are not byte sizes. Compare identical workloads and version-pinned builds before calling an increase a memory leak.
mallocinfo mode
On compatible glibc builds, mallocinfo returns allocator XML rather than the stats object. Availability and schema depend on the platform and allocator. Parse defensively, restrict RPC access and avoid forwarding full dumps because allocation patterns may reveal operationally sensitive information.
Operating-system controls
Memory locking can be limited by process rlimits, service-manager settings, container permissions or host policy. Confirm the effective limit and startup logs on the deployed service account. Do not grant broad privileges merely to remove a warning; use the narrowest supported capability and retain rollback.
Monitoring policy
Alert on locked below total, mode failure, abrupt managed-memory growth and correlation with wallet operations. Add RSS, swap activity, page faults, database cache and mempool metrics. Store aggregate results rather than detailed allocator data where privacy and attack-surface concerns outweigh diagnostic value.
Reproduction matrix
On a disposable encrypted wallet, test normal startup, constrained lock limits, wallet use, restart and unsupported mallocinfo. Verify byte arithmetic, conditional result types and warning routes. Never use production keys or attach raw allocator XML to a public support ticket.
Frequently asked questions
What is the main point of Bitcoin Core getmemoryinfo RPC?
Bitcoin Core getmemoryinfo RPC: Default stats describes the locked-memory manager, not resident set size, database cache, mempool or operating-system pressure.
For Bitcoin Core getmemoryinfo RPC, what should a beginner know about stats mode scope?
Default stats describes the locked-memory manager, not resident set size, database cache, mempool or operating-system pressure.
For Bitcoin Core getmemoryinfo RPC, what should a beginner know about locked versus total?
The locked field records bytes successfully locked against swapping. If it is smaller than total, locking failed at some point and key-related data could have been swapped to disk.
For Bitcoin Core getmemoryinfo RPC, what should a beginner know about chunk counters?
chunks_used and chunks_free describe allocator blocks within the managed arenas. Trends can help identify fragmentation or lifecycle changes, but counts are not byte sizes.
Conclusion
getmemoryinfo is most valuable for confirming sensitive-memory locking and allocator behaviour. It must be combined with host telemetry and handled as potentially sensitive diagnostic evidence.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.