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.
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
Bash
sudo nano /etc/sysctl.d/20-solana-udp-buffers.confB. Paste the following configuration:
Ini, TOML
# 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=1000000C. Apply changes
Bash
sudo sysctl -p /etc/sysctl.d/20-solana-udp-buffers.conf2. 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
Bash
sudo nano /etc/security/limits.d/90-solana-nofiles.confB. Paste the following:
Ini, TOML
# Increase process file descriptor count limit for solana user
solana soft nofile 1000000
solana hard nofile 1000000
# Increase memory locked limit
solana soft memlock unlimited
solana hard memlock unlimited🔄 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 return1000000).
3. Disk Partitioning & Mounting
As discussed in Prerequisites, you should have separate NVMe drives for the Ledger (History) and Accounts (State).
A. Format Drives (EXT4) Assuming your drives are /dev/nvme1n1 and /dev/nvme2n1:
Bash
sudo mkfs.ext4 -L LEDGER /dev/nvme1n1
sudo mkfs.ext4 -L ACCOUNTS /dev/nvme2n1B. Create Mount Points
Bash
sudo mkdir -p /mnt/ledger
sudo mkdir -p /mnt/accountsC. Configure Auto-Mount (fstab) Edit the file system table to ensure drives mount on reboot with performance flags.
Bash
sudo nano /etc/fstabAdd these lines to the bottom of the file:
Ini, TOML
LABEL=LEDGER /mnt/ledger ext4 defaults,noatime,discard 0 0
LABEL=ACCOUNTS /mnt/accounts ext4 defaults,noatime,discard 0 0noatime: Disables writing "last access time" metadata (Saves IOPS).discard: Enables TRIM for SSD health.
D. Mount and Set Permissions
Bash
# Mount all drives
sudo mount -a
# Set ownership to the solana user
sudo chown -R solana:solana /mnt/ledger
sudo chown -R solana:solana /mnt/accounts4. CPU Performance Mode
Ensure your CPU is running at maximum frequency and not trying to save power.
Bash
# Install tools
sudo apt install -y linux-tools-common linux-tools-generic
# Set governor to performance
echo "performance" | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor✅ Checklist: Ready for Installation?
[ ]
sysctlparameters updated.[ ]
ulimit -nreturns 1,000,000.[ ] Drives mounted at
/mnt/ledgerand/mnt/accounts.[ ] Directories owned by user
solana.
Last updated