Skip to main content
Optimize your Bitcoin Core node for better performance, lower resource usage, and reduced bandwidth consumption.

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:
During IBD: Set -dbcache to 50% of your available RAM for maximum speed.After IBD: You can reduce it to save memory. Default (450 MiB) is adequate for normal operation.
In 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:
This mode:
  • Reduces default mempool to 5 MB
  • Opts out of receiving and relaying transactions (except from whitelisted peers)
  • Significantly reduces bandwidth and memory usage
Privacy Warning: Do not use -blocksonly when broadcasting your own transactions. They will stand out and affect privacy.When using with a wallet, also set:
Use an alternative method to broadcast transactions.

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
Manual connections via -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:
This limits glibc’s 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:
When the limit is approached:
  • Node stops serving historical blocks (older than one week)
  • Continues to serve recent blocks
  • Not a hard limit; minimizes traffic while staying functional
Supports suffix units: [k|K|m|M|g|G|t|T]
  • Lowercase = 1000-based (5000m = 5,000,000,000 bytes)
  • Uppercase = 1024-based (5000M = 5,242,880,000 bytes)
  • Default unit if none specified: M (1024-based)
Peers with the download permission are never disconnected but their traffic still counts.

Disable Listening

Prevent inbound connections:
This:
  • Limits connections to 11 outbound peers
  • Reduces upload bandwidth significantly
  • Stops serving blocks to new nodes
Reducing connections to a minimum compromises Bitcoin’s trustless model. Connecting to more peers improves security.

Blocks-Only Mode for Bandwidth

Disable transaction relay:
Effects on network traffic:
  • Drastically reduces P2P bandwidth
  • Stops relaying transactions to peers
  • Only synchronizes blocks
Side effects:
  • 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 forcerelay permission

Reduce Maximum Connections

Fewer connections = less bandwidth:
Combining several options for minimal bandwidth:

Storage Optimization

Enable Pruning

Reduce disk space requirements:
See the Pruning documentation for complete details.

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:
  • par=0: Auto-detect (recommended)
  • par=N: Use exactly N threads
  • par=-N: Use all cores except N

Script Cache Size

Increasing signature cache can improve performance:
This is automatically tuned based on -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
If you can’t store everything on SSD:
  • Put chainstate on SSD (stores UTXO set, critical for performance)
  • Keep blocks on HDD (sequential access, less performance-critical)

Separate Data Directories

Split blockchain data across drives:

Network Performance

DNS Seed Configuration

Control peer discovery:

Manual Peer Selection

Connect to specific trusted nodes:
Using -connect disables automatic peer connections. Only use this if you trust your specified peers.

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

Look for:
  • size_on_disk: Total blockchain size
  • prune_target_size: Pruning target (if enabled)
  • blocks vs headers: Sync progress

Performance Benchmarking

For detailed performance analysis:
External tools:
  • benchcoin - Monitor IBD and reindex performance
See the Benchmarking documentation for more information.

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