Skip to content

Solana Node Installation Guide: Optimize Ubuntu system parameters to allow the Solana node to run on more affordable servers while maintaining good performance and block synchronization speed.

Notifications You must be signed in to change notification settings

MaxWell219/Solana-RPC-Install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Solana RPC Install

Production-ready Solana RPC node deployment in 3 simple steps

Deploy battle-tested Solana RPC nodes with stable, proven configurations and source compilation from GitHub.

Release License GitHub stars GitHub forks

Bash Solana Ubuntu RPC Node


🎯 System Requirements

Minimum Configuration:

  • CPU: AMD Ryzen 9 9950X (or equivalent)
  • RAM: 192 GB minimum (256 GB recommended)
  • Storage: 2-3x NVMe SSDs (1TB system + 2TB accounts OR combined 2TB+ accounts/ledger)
  • OS: Ubuntu 20.04/22.04
  • Network: High-bandwidth connection (1 Gbps+)

πŸš€ Quick Start

# Switch to root user
sudo su -

# Clone repository to /root
cd /root
git clone https://github.com/zydomus/solana-rpc-install.git
cd solana-rpc-install

# Step 1: Mount disks + System optimization (no reboot needed)
bash 1-prepare.sh

# Step 2: Install Solana from source (20-40 minutes)
bash 2-install-solana.sh
# Enter version when prompted (e.g., v3.0.10)

# Step 3: Download snapshot and start node
bash 3-start.sh

⚠️ Critical: Memory Management Details (Required for 128GB Systems)

πŸ“Œ Why Swap Might Be Needed?

  • Memory peaks can exceed 128GB during initial sync (115-130GB)
  • Without swap, node may crash with OOM
  • Swap provides safety buffer during sync phase
  • After sync stabilizes, memory usage drops to 85-105GB

πŸ”§ Swap Management (Optional for 128GB Systems)

Add Swap (If needed during sync)

# Only if you see high memory pressure during sync
cd /root/solana-rpc-install
sudo bash add-swap-128g.sh

# Script automatically checks:
# βœ“ Only adds swap if system RAM < 160GB
# βœ“ Skips if swap already exists
# βœ“ Adds 32GB swap with swappiness=10 (minimal usage)

Remove Swap (After sync completes)

Once synchronization completes, memory usage stabilizes at 85-105GB, and you can remove swap for optimal performance:

# Check current memory usage
systemctl status sol | grep Memory

# If memory peak < 105GB, safe to remove swap
cd /root/solana-rpc-install
sudo bash remove-swap.sh

πŸ“Š Decision Guidelines

Memory Peak Recommended Action
< 105GB βœ… Can remove swap for optimal performance
105-110GB ⚠️ Recommended to keep swap as buffer
> 110GB πŸ”΄ Must keep swap to prevent OOM

Note: If memory issues occur after removing swap, you can always add it back:

cd /root/solana-rpc-install
sudo bash add-swap-128g.sh

πŸ“Š Monitoring & Management

# Real-time logs
journalctl -u sol -f

# Performance monitoring
bash /root/performance-monitor.sh snapshot

# Health check (available after 30 minutes)
/root/get_health.sh

# Sync progress
/root/catchup.sh

✨ Key Features

πŸ”§ Battle-Tested Configuration Philosophy

All configurations are based on proven production deployments with thousands of hours of uptime:

  • Conservative Stability > Aggressive Optimization
  • Simple Defaults > Complex Customization
  • Proven Performance > Theoretical Gains

πŸ“¦ System Optimizations (No Reboot Required)

  • 🌐 TCP Congestion Control: Westwood (classic, stable algorithm)
  • πŸ”§ TCP Buffers: 12MB (conservative, low-latency optimized)
  • πŸ’Ύ File Descriptors: 1M limit (sufficient for production)
  • πŸ›‘οΈ Memory Management: swappiness=30 (balanced approach)
  • πŸ”„ VM Settings: Conservative dirty ratios for stability

⚑ Yellowstone gRPC Configuration

  • βœ… Compression Enabled: gzip + zstd (reduces memory copy overhead)
  • πŸ“¦ Conservative Buffers: 50M snapshot, 200K channel (fast processing)
  • 🎯 Proven Defaults: System-managed Tokio, default HTTP/2 settings
  • πŸ›‘οΈ Resource Protection: Strict filter limits prevent abuse

πŸš€ Deployment Features

  • πŸ“¦ Source Compilation: Latest Agave version from GitHub
  • πŸ”„ Automatic Disk Management: Smart disk detection and mounting
  • πŸ›‘οΈ Production Ready: Systemd service with memory limits and OOM protection
  • πŸ“Š Monitoring Tools: Performance tracking and health checks included

πŸ”Œ Network Ports

Port Protocol Purpose
8899 HTTP RPC endpoint
8900 WebSocket Real-time subscriptions
10900 gRPC High-performance data streaming
8000-8025 TCP/UDP Validator communication (dynamic)

πŸ“ˆ Performance Metrics

  • Snapshot Download: Network-dependent (typically 200MB - 1GB/s)
  • Memory Usage: 60-110GB during sync, 85-105GB stable (optimized for 128GB systems)
  • Sync Time: 1-3 hours (from snapshot)
  • CPU Usage: Multi-core optimized (32+ cores recommended)
  • Stability: Proven configuration with >99.9% uptime in production

πŸ› οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Solana RPC Node Stack                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Agave Validator (Latest v3.0.x from source)            β”‚
β”‚  β”œβ”€ Yellowstone gRPC Plugin v10.0.1 (Data streaming)   β”‚
β”‚  β”œβ”€ RPC HTTP/WebSocket (Port 8899/8900)                 β”‚
β”‚  └─ Accounts & Ledger (Optimized RocksDB)               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  System Optimizations (Battle-Tested)                   β”‚
β”‚  β”œβ”€ TCP: 12MB buffers, Westwood congestion control      β”‚
β”‚  β”œβ”€ Memory: swappiness=30, balanced VM settings         β”‚
β”‚  β”œβ”€ File Descriptors: 1M limit, sufficient for prod     β”‚
β”‚  └─ Stability: Conservative defaults, proven in prod    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Yellowstone gRPC (Open-Source Tested Config)           β”‚
β”‚  β”œβ”€ Compression: gzip+zstd enabled (fast processing)    β”‚
β”‚  β”œβ”€ Buffers: 50M snapshot, 200K channel (low latency)   β”‚
β”‚  β”œβ”€ Defaults: System-managed, no over-optimization      β”‚
β”‚  └─ Protection: Strict filters, resource limits         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Infrastructure                                          β”‚
β”‚  β”œβ”€ Systemd Service (Auto-restart, graceful shutdown)   β”‚
β”‚  β”œβ”€ Multi-disk Setup (System/Accounts/Ledger)           β”‚
β”‚  └─ Monitoring Tools (Performance/Health/Catchup)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ§ͺ Configuration Philosophy

Why Conservative Configuration?

Based on extensive production testing, we discovered:

  1. Compression Enabled = Lower Latency

    • Even on localhost, compressed data transfers faster in memory
    • CPU overhead is minimal, latency reduction is significant
  2. Smaller Buffers = Faster Processing

    • 50M snapshot vs 250M: Less queue delay, faster throughput
    • 200K channel vs 1.5M: Reduced "buffer bloat" latency
  3. System Defaults = Better Stability

    • No custom Tokio threads: Let system auto-manage
    • No custom HTTP/2 settings: Defaults are already optimized
    • Fewer custom parameters = Fewer potential issues
  4. Proven in Production

    • Thousands of hours of uptime
    • Tested across different hardware configurations
    • Battle-tested under real-world load

πŸ“š Backup Configuration

If you need the aggressive optimization config for specific use cases:

  • Extreme config backed up as yellowstone-config-extreme-backup.json
  • Accessible in repository history (commit 6cc31d9)

πŸ“š Documentation

  • Installation Guide: You're reading it!
  • Troubleshooting: Check logs with journalctl -u sol -f
  • Configuration: All optimizations included by default
  • Monitoring: Use provided helper scripts
  • Optimization Details: See YELLOWSTONE_OPTIMIZATION.md

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ If this project helps you, please give us a Star!

Made with ❀️ by Zydomus

About

Solana Node Installation Guide: Optimize Ubuntu system parameters to allow the Solana node to run on more affordable servers while maintaining good performance and block synchronization speed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages