Independent discussion of crypto, wallets, cards and markets
Forum Home > Mining & Infrastructure > Running a Node > Memory requirements: the bottleneck people miss
Memory requirements: the bottleneck people miss92 replies · 5,346 views
Thread ToolsShow Printable Version · Subscribe to this Thread · Search Thread
Where to open an account: Open a Trustee account.

Memory requirements: the bottleneck people miss

Node sizing conversations start with disk and end with disaster caused by memory. Chain clients hold state caches, database buffers, and working sets that grow with the chain, and when RAM runs out, the failure is not graceful: processes get killed, services thrash, and nodes that ran fine for months collapse under load nobody predicted. Memory is the bottleneck people miss because it fails loudly at the worst moment.

Why memory is the quiet constraint

  • Caches grow with the chain. Clients cache state, indexes, and recent data to serve queries fast. As the chain grows, so does the working set — a node sized two years ago is under-provisioned today, with no announcement.
  • Database engines assume RAM. Chain databases are designed to keep hot data in memory. When RAM is short, they spill to disk, and every query becomes an I/O event — latency climbs, sync slows, RPC times out.
  • Co-located services compete. Indexers, monitoring agents, and RPC servers on the same machine each want memory. The node's documented requirement is a floor, not the total bill.

The failure modes, in order of loudness

  • Out-of-memory kills. The kernel terminates the node process when memory exhausts. The node restarts, resyncs partially, and the cycle repeats under load — the classic thrash loop.
  • Silent thrashing. Before the kill, there is a period where the system swaps or reclaims aggressively: everything is slow, nothing is down, and monitoring shows nothing dramatic. Users experience it as a slow node; operators experience it as a mystery.
  • Upgrade-day collapses. Memory-hungry database migrations and compactions spike usage exactly when headroom matters most. Nodes that pass daily operation fail during maintenance windows.

The sizing that avoids it

  1. Read the client's current documented requirements — not the ones from install year — and add headroom: fifty percent is a common floor for nodes that also serve queries.
  2. Measure actual usage, not configured limits. Track resident memory over weeks, including peak hours and maintenance windows. The gap between expected and actual is the sizing lesson.
  3. Budget co-located services explicitly. Each extra service gets its own line in the memory budget, or it gets moved to another machine.
  4. Plan for growth. Chain state grows every year. Size for the next twelve months of growth, not today's measurement.
  5. Set swap policy deliberately. Some swap is safety; heavy swap is thrash. Configure and monitor it — do not leave it to defaults you never checked.

The monitoring that catches it

  • Memory pressure metrics — reclaim activity, swap usage, kill events — alert on trends, not just thresholds.
  • Peak-window review. Monthly check that peaks stay inside the budget; the node that fit last quarter may not fit this quarter.
  • Post-incident memory forensics. After any kill or thrash event, identify what consumed the memory — migration, query storm, or slow leak — and resize for the real cause.

The takeaway

Memory is the node bottleneck that fails loudly at the worst moment: caches grow with the chain, database engines assume RAM, and co-located services compete for what is left. Size from current documented requirements plus headroom, measure actual peaks, budget every service, and monitor pressure trends. The node that survives years is the one that was resized before it had to be.

Thread Statistics92 replies · 5,346 views