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.conf

B. 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=1000000

C. Apply changes

Bash


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

Bash

B. Paste the following:

Ini, TOML

🔄 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).

A. Format Drives (EXT4) Assuming your drives are /dev/nvme1n1 and /dev/nvme2n1:

Bash

B. Create Mount Points

Bash

C. Configure Auto-Mount (fstab) Edit the file system table to ensure drives mount on reboot with performance flags.

Bash

Add these lines to the bottom of the file:

Ini, TOML

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

  • discard: Enables TRIM for SSD health.

D. Mount and Set Permissions

Bash


4. CPU Performance Mode

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

Bash


✅ 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.

Last updated