Skip to main content
The fdctl configure command sets up your host system so Firedancer can run correctly. This step must be performed after each system reboot to reconfigure kernel parameters, huge pages, and networking devices.

Overview

The configure command performs several critical system setup tasks:
  • hugetlbfs - Reserves huge (2MiB) and gigantic (1GiB) pages for Firedancer
  • sysctl - Sets required kernel parameters
  • hyperthreads - Checks hyperthreaded pairs for critical CPU cores
  • bonding - Prepares bonded network devices for XDP networking
  • ethtool-channels - Configures network device channel count
  • ethtool-offloads - Disables incompatible offload features
  • ethtool-loopback - Disables tx-udp-segmentation on loopback

Configure Modes

You run configure with fdctl configure <mode> <stage>... where mode is one of:
1

check

Verifies if each stage is already configured. Never requires privileges and makes no changes to the system. Exits with an error if stages are not properly configured.
2

init

Configures the provided stages if they are not already configured. Only requires privileges if it needs to actually change something.
3

fini

Unconfigures (reverses) the stage if it is reversible. Useful for cleanup.
You can specify individual stages or use all to configure everything:
sudo fdctl configure init all --config ~/config.toml

Configuration Stages

hugetlbfs

Reserves huge (2MiB) and gigantic (1GiB) memory pages from the Linux kernel for Firedancer. Almost all memory in Firedancer is allocated from these pages for performance reasons. This is a two-step process:
  1. Increases the number of huge and gigantic pages in the kernel by modifying /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/nr_hugepages
  2. Assigns pages to Firedancer by creating hugetlbfs mounts at /mnt/.fd/.gigantic/ and /mnt/.fd/.huge
Run the hugetlbfs step immediately when the system boots. If run later, it may fail because operating system memory becomes fragmented and large contiguous blocks cannot be reserved.
Privilege requirements: Root privileges required (capabilities not sufficient) Persistence: Must be run after each reboot The fini mode unmounts the filesystems and returns pages to the kernel global pool, but will not decrease the global pool size.

sysctl

Configures kernel parameters for optimal Firedancer performance. The stage only increases values to meet minimums and will not decrease them if the minimum is already met.
SysctlMinimumRequiredDescription
vm.max_map_count1000000YesAgave accounts database requires mapping many files
fs.file-max1024000YesAgave accounts database requires opening many files
fs.nr_open1024000YesAgave accounts database requires opening many files
net.ipv4.conf.lo.rp_filter2YesRequired for QUIC over loopback
net.ipv4.conf.lo.accept_local1YesRequired for QUIC over loopback
net.core.bpf_jit_enable1NoMakes BPF networking faster
kernel.numa_balancing0NoFiredancer manages NUMA, rebalancing hurts performance
Non-required sysctls produce warnings if not set correctly, but configuration will proceed normally.
Privilege requirements: Root or CAP_SYS_ADMIN The fini mode does nothing - kernel parameters are never reduced or changed back.

hyperthreads

Firedancer has two critical tiles that must run serially on dedicated cores:
  • pack - Schedules transactions for execution when leader
  • poh - Performs repeated SHA256 hashes and stamps blocks when leader
On hyperthreaded CPUs, this stage checks if the hyperthreaded pairs of these tiles are used or online, and prints warnings if they should be disabled for optimal performance.
When using auto layout, Firedancer ensures no other tiles run on the hyperthread pairs. With manual layouts, you must verify this yourself.
This stage has no dependencies but is dependent on your configuration topology. You should disable the CPUs specified in warnings for best performance.

bonding

Validator hosts commonly use bonded network devices for increased bandwidth and fault tolerance. Common Linux distributions use bonding driver defaults incompatible with XDP mode on some network drivers. Firedancer reconfigures bonding parameters to tolerate brief downtime when configuring XDP by increasing timeout parameters in /sys/class/net/bond0/bonding/ to five seconds:
  • miimode
  • downdelay
  • peer_notif_delay
Privilege requirements: Root privileges required (capabilities not sufficient)

ethtool-channels

Configures receive side scaling (RSS) to improve network performance. Each net tile serves one network queue, so this stage modifies the network device to steer all Firedancer packets to the proper queues. Three modes are available (set in your configuration):
Modifies the combined channel count to match the number of net tiles. Works with all network devices but reduces queue count system-wide, potentially impacting non-Firedancer traffic.Similar to running:
ethtool --set-channels <device> combined <N>
Reserves a dedicated hardware queue for each net tile. More advanced and may not work with all devices. Modifies the RXFH indirection table and installs ntuple rules to direct Firedancer traffic to dedicated queues while sharding other traffic across the rest. Better performance for both Firedancer and non-Firedancer traffic.
Attempts dedicated mode first, automatically falls back to simple mode if any failure occurs.
Privilege requirements: Root privileges required (capabilities not sufficient) Persistence: Must be run after each reboot

ethtool-offloads

XDP is incompatible with certain network device features that must be disabled:
  • rx-udp-gro-forwarding
  • GRE segmentation offload
Similar to running:
ethtool --offload <device> <offload> off
Privilege requirements: Root privileges required (capabilities not sufficient) Persistence: Must be run after each reboot

ethtool-loopback

XDP is incompatible with localhost UDP traffic using tx-udp-segmentation. This feature must be disabled when connecting Agave clients to Firedancer over loopback or when using Frankendancer. Runs the command:
ethtool --offload lo tx-udp-segmentation off
Privilege requirements: Root privileges required (capabilities not sufficient) Persistence: Must be run after each reboot

Complete Initialization

To initialize all stages at once:
sudo fdctl configure init all --config ~/config.toml
It is strongly recommended to run the configure command automatically when your system boots. All stages need to be reconfigured after each reboot.
You can check the current configuration status without making changes:
fdctl configure check all --config ~/config.toml
To remove all configuration (useful for troubleshooting):
sudo fdctl configure fini all --config ~/config.toml

Build docs developers (and LLMs) love