Memory Optimization
Bitcoin Core’s memory usage can be tuned to match your system’s capabilities.Database Cache
The UTXO database cache is the most important memory setting:bitcoin.conf:
The dbcache setting is in MiB (1024-based). The minimum value is 4 MiB, default is 450 MiB.
Mempool Configuration
The mempool stores unconfirmed transactions:Unused mempool memory is shared with the UTXO cache, so reducing
-maxmempool helps limit overall memory usage.Blocks-Only Mode
Disable transaction relay to minimize memory usage:- Reduces default mempool to 5 MB
- Opts out of receiving and relaying transactions (except from whitelisted peers)
- Significantly reduces bandwidth and memory usage
Connection Limits
Reduce the number of peer connections:Each connection consumes memory. With
-maxconnections=0 or when inbound connections are disabled, only 11 outbound connections are maintained:- 8 full-relay connections
- 2 block-relay-only connections
- Occasionally 1 short-lived feeler or extra block-relay-only connection
-addnode or the addnode RPC have a separate limit of 8 connections.
Thread Configuration
Reduce thread count on memory-constrained systems:On Linux, each thread uses 8 MiB (64-bit) or 4 MiB (32-bit) for the thread stack.
Linux-Specific: Memory Allocator
Reduce memory fragmentation on Linux:malloc to a single arena, preventing excessive memory usage in some scenarios.
This setting may theoretically reduce parallel allocation performance, but Bitcoin Core does minimal parallel allocation, so the impact is expected to be small or absent.
Reducing Network Traffic
Optimize bandwidth usage for systems with limited or metered internet connections.Upload Limits
Limit outbound traffic per day:- Node stops serving historical blocks (older than one week)
- Continues to serve recent blocks
- Not a hard limit; minimizes traffic while staying functional
download permission are never disconnected but their traffic still counts.
Disable Listening
Prevent inbound connections:- Limits connections to 11 outbound peers
- Reduces upload bandwidth significantly
- Stops serving blocks to new nodes
Blocks-Only Mode for Bandwidth
Disable transaction relay:- Drastically reduces P2P bandwidth
- Stops relaying transactions to peers
- Only synchronizes blocks
- Fee estimation stops working
- Automatic wallet broadcasting is disabled (unless manually enabled)
- Compact block relay is less efficient (slower block propagation)
- Still receives transactions from peers with the
forcerelaypermission
Reduce Maximum Connections
Fewer connections = less bandwidth:Storage Optimization
Enable Pruning
Reduce disk space requirements:Database Write Batch Size
Adjust database write batching (advanced):This is a debug option. Most users should not change it.
CPU Optimization
Script Verification Threads
Balance CPU usage and validation speed:Script Cache Size
Increasing signature cache can improve performance:-dbcache and rarely needs manual adjustment.
I/O Optimization
Use SSD Storage
The single most impactful hardware upgrade:- IBD time: 10-20x faster with SSD vs HDD
- Block validation: Near-instant on SSD
- Reindex performance: Dramatically improved
Separate Data Directories
Split blockchain data across drives:Network Performance
DNS Seed Configuration
Control peer discovery:Manual Peer Selection
Connect to specific trusted nodes:Recommended Configurations
Low-Resource System (2 GB RAM, HDD)
Medium System (8 GB RAM, SSD)
High-Performance System (16+ GB RAM, NVMe SSD)
Bandwidth-Constrained System
Monitoring Performance
Check Memory Usage
Monitor Network Traffic
Database Statistics
size_on_disk: Total blockchain sizeprune_target_size: Pruning target (if enabled)blocksvsheaders: Sync progress
Performance Benchmarking
For detailed performance analysis:- benchcoin - Monitor IBD and reindex performance
Next Steps
Initial Block Download
Optimize IBD with these settings
Pruning
Enable pruning to save disk space
Configuration
Learn about bitcoin.conf options
Running Bitcoin Core
Basic node operation guide