Step 2: System Tuning

Kernel parameter optimization, system limits, and disk formatting.

Step 2: System Tuning

Standard Linux distributions are configured for general-purpose computing. Solana is a high-performance UDP-based protocol that pushes the OS to its absolute limits. We must manually override the kernel parameters to handle the massive volume of network packets and open file descriptors.

💡 Note: The Agave validator binary includes a solana-sys-tuner daemon that automatically adjusts some of these settings at runtime. However, it is still best practice to persist them in config files so they survive reboots. Always restart solana-sys-tuner after each software upgrade to ensure the latest recommended settings are applied.


1. Optimize Kernel Parameters (sysctl)

We need to increase the UDP buffer sizes and memory map limits to accommodate the Solana Accounts Database.

A. Create the configuration file

sudo nano /etc/sysctl.d/20-solana-udp-buffers.conf

B. Paste the following configuration:

# Increase UDP Buffer sizes for high-volume gossip
net.core.rmem_max=134217728
net.core.rmem_default=134217728
net.core.wmem_max=134217728
net.core.wmem_default=134217728

# Increase memory map limit (Critical for Accounts DB)
# Allows the node to map the massive accounts database into RAM
vm.max_map_count=1000000

# Increase limit for open files (File Descriptors)
fs.nr_open=1000000

C. Apply changes


2. Configure User Limits (NOFILE)

Default Linux users are often limited to 1024 open files. A busy Solana node handles thousands of connections and file handles simultaneously.

A. Edit the limits configuration

B. Paste the following:

🔄 Action Required: You must close your current session and log back in for these limits to apply. Verify the change by running: ulimit -n (It should return 1000000).


3. Disk Partitioning & Mounting

As discussed in Prerequisites, you should have separate NVMe drives for the Ledger (History) and Accounts (State). Using separate drives prevents I/O contention between read-heavy account queries and write-intensive ledger operations.

⚠️ Important: Use enterprise-grade NVMe SSDs exclusively. Consumer-grade drives will wear out or degrade quickly under Solana's sustained write workload.

A. Format Drives (EXT4)

Assuming your drives are /dev/nvme1n1 and /dev/nvme2n1:

B. Create Mount Points

C. Configure Auto-Mount (fstab)

Edit the file system table to ensure drives mount on reboot with performance flags.

Add these lines to the bottom of the file:

  • noatime: Disables writing "last access time" metadata (Saves IOPS).

  • discard: Enables TRIM for SSD health.

D. Mount and Set Permissions


4. CPU Performance Mode

Ensure your CPU is running at maximum frequency and not trying to save power.

💡 Tip: To make the CPU governor persist across reboots, consider adding the command above to /etc/rc.local or creating a systemd service for it.


✅ Checklist: Ready for Installation?

  • [ ] sysctl parameters updated.

  • [ ] ulimit -n returns 1,000,000.

  • [ ] Drives mounted at /mnt/ledger and /mnt/accounts.

  • [ ] Directories owned by user solana.

  • [ ] CPU governor set to performance.

Last updated