Improve Performance
Here we share some small but useful tweaks to squeeze a bit more performance out of your node. Nothing too fancy — just practical stuff we’ve tested ourselves: kernel tuning, disks layout, and a few tricks that can make your setup run smoother and faster.
Enable AMD P-State Scaling Driver
Edit /etc/default/grub and add amd_pstate=active the following line:
GRUB_CMDLINE_LINUX_DEFAULT="amd_pstate=active"
Then update GRUB and reboot:
sudo update-grub && sudo reboot
CPU Governor
Set the CPU governor to performance mode:
for cpu in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
echo performance | sudo tee "$cpu"
done
And/or install cpufrequtils to make it persistent across reboots:
sudo apt install -y cpufrequtils
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
sudo systemctl disable --now ondemand
sudo systemctl enable --now cpufrequtils
Disk Layout
For best disk I/O latency, use NVMe drives in RAID0:
sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/nvmeXnY /dev/nvmeXnZ
Format RAID0 as XFS
Stripe and format RAID0 with 2 disks:
sudo mkfs.xfs -f -m reflink=0 -L celestia -d su=512k,sw=2 /dev/md0
Mount the RAID0 Volume
Create a mount point:
sudo mkdir -p /mnt/celestia
Add the mount point to /etc/fstab:
LABEL=celestia /mnt/celestia xfs defaults,noatime,logbufs=8,nofail 0 0
Mount it:
sudo mount -a
Network Congestion Control
Add this string to /etc/sysctl.conf or your file in /etc/sysctl.d/ :
net.ipv4.tcp_congestion_control = bbr
Binary Optimization
For optimal performance with minimal RAM usage, build with jemalloc:
make build-jemalloc
📘 Read more: