Documentation Index
Fetch the complete documentation index at: https://mintlify.com/firedancer-io/firedancer/llms.txt
Use this file to discover all available pages before exploring further.
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:| Tile | Description |
|---|---|
net | Sends and receives network packets from the network device |
quic | Receives transactions from clients, performing all connection management and packet processing to manage and implement the QUIC protocol |
verify | Verifies the cryptographic signature of incoming transactions, filtering invalid ones |
dedup | Checks for and filters out duplicated incoming transactions |
pack | Collects incoming transactions and smartly schedules them for execution when you are leader |
bank | Executes transactions that have been scheduled when you are leader |
poh | Continuously hashes in the background, and mixes the hash in with executed transactions to prove passage of time |
shred | Distributes block data to the network when leader, and receives and retransmits block data when not leader |
store | Receives block data when you are leader, or from other nodes when they are leader, and stores it locally in a database on disk |
metric | Collects monitoring information about other tiles and serves it on an HTTP endpoint |
sign | Holds the validator private key, and receives and responds to signing requests from other tiles |
resolv | Resolves address lookup tables before transactions are scheduled |
diag | Counts context switches and diagnostic information of other tiles |
plugin | Provides data to the gui tile |
gui | Receives data from the validator and serves an HTTP endpoint to clients to view it |
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:
| Tile | Core |
|---|---|
| 0 | floating |
| 1 | 0 |
| 2 | 1 |
| 3 | 2 |
| 4 | 4 |
| 5 | floating |
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:
| Tile | Default | Notes |
|---|---|---|
net | 1 | Handles >1M TPS per tile. Designed to scale out for future network conditions, but there is no need to run more than 1 net tile at the moment on mainnet-beta |
quic | 1 | Handles >1M TPS per tile. Designed to scale out for future network conditions, but there is no need to run more than 1 QUIC tile at the moment on mainnet-beta |
verify | 4 | Handles 20-40k TPS per tile. Recommend running many verify tiles, as signature verification is the primary bottleneck of the application |
bank | 4 | Handles 20-40k TPS per tile, with diminishing returns from adding more tiles. Designed to scale out for future network conditions, but 4 tiles is enough to handle current mainnet-beta conditions. Can be increased further when benchmarking to test future network performance |
shred | 1 | Throughput is mainly dependent on cluster size, 1 tile is enough to handle current mainnet-beta conditions. In benchmarking, if the cluster size is small, 1 tile can handle >1M TPS |
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