Overview
The Firedancer validator is composed of a handful of threads, each performing one of fifteen distinct jobs. Some jobs only need one thread to do them, but certain jobs require many threads performing the same work in parallel. Each thread is given a CPU core to run on, and threads take ownership of the core: never sleeping or letting the operating system use it for another purpose. The combination of a job, the thread it runs on, and the CPU core it is assigned to is called a tile.Tile Types
The fifteen kinds of tiles are:These tiles communicate with each other via shared memory queues. The work each tile performs and how they communicate with each other is fixed, but the count of each tile kind and which CPU cores they are assigned to is set by your configuration.
Default Configuration
The default configuration provided if no options are specified is given in thedefault.toml file:
net, quic, verify, bank, and shred tile counts are configurable. There may be 0 or 1 plugin and gui tiles if the GUI is disabled or enabled. The rest are fixed at one thread each.
CPU Core Assignment
The assignment of tiles to CPU cores is determined by theaffinity string. The Frankendancer validator currently starts an Agave process to perform functionality like replay, gossip, and repair that is not yet implemented in Firedancer. The agave_affinity string determines the CPU cores that are given to the threads of this Agave process.
Affinity Syntax
You can specify CPU cores using the following syntax:- Single core:
"0" - Range:
"0-10" - Range with stride:
"0-10/2"(useful for hyperthreading) - Floating tiles:
"f5"(next 5 tiles are not pinned)
f1,0-1,2-4/2,f1:
Performance Characteristics
The following table shows the performance of the adjustable tiles on an Intel Icelake core, along with some performance notes and recommendations formainnet-beta:
Example Configurations
- AMD Zen3 (32 cores)
- AMD Zen4 (64 cores)
- Intel Icelake (80 cores)
Monitoring Tile Performance
You can monitor tile performance using thefdctl monitor command:
% finish- Percentage of time the tile is occupied doing workovernp cnt- Indicates the tile is being overrun and dropping transactions% backp- Time spent in backpressure waiting for downstream tiles
For more information on monitoring, see the Monitoring guide.
Tuning Strategy
- Start with defaults - Begin with the default configuration
- Monitor performance - Use
fdctl monitorto identify bottlenecks - Increase verify tiles - Signature verification is often the bottleneck
- Adjust bank tiles - Add bank tiles if execution is slow (diminishing returns)
- Verify no overlap - Ensure
affinityandagave_affinitydon’t overlap - Test under load - Use benchmarking tools to validate your configuration