Raw Shreds
Packet-level Solana shred latency benchmarking with solana-shred-perf
Use solana-shred-perf (Solana Shred Latency Benchmark) to compare Raw Shreds and other UDP shred sources on your host.
It uses libpcap to passively capture shred packets — it does not bind the port, so it can run alongside your app, validator, proxy, or relayer without interfering.
For every shred (ShredId = slot + index + type), it records who delivered it first and how far behind everyone else was, then prints periodic latency tables (win rate, p10–p99).
This tool is for Raw Shreds (UDP). For Decoded Shreds, Binary, Preconfs, and Geyser gRPC / Fastlane, use GeyserBench.
What it measures
- First source per shred
- Delay behind the winner
- Win rate per source
- p10, p30, p50, p70, p90, p99 delay distribution
Modes
| Mode | Use when |
|---|---|
raw-ports | Multiple deliverers, each on its own destination port |
raw-ips (recommended for many setups) | Multiple sources send to one shared port; compare by source IP |
Build
Requires Rust and libpcap headers.
# Debian/Ubuntu
sudo apt-get install libpcap-dev
git clone https://github.com/shrederxyz/solana-shred-perf.git
cd solana-shred-perf
cargo build --releaseBinary: target/release/solana-shred-perf
Run
Packet capture needs elevated privileges (sudo or cap_net_raw).
Compare two ports (raw-ports)
sudo RUST_LOG=info ./target/release/solana-shred-perf \
--interface any \
--ports 20000,20005 \
--mode raw-ports \
--report-interval-secs 20 \
--settle-window-ms 1000--interface any captures all interfaces on Linux.
Compare source IPs on one port (raw-ips)
sudo RUST_LOG=info ./target/release/solana-shred-perf \
--interface any \
--ports 20000 \
--mode raw-ips \
--report-interval-secs 20 \
--settle-window-ms 1000 \
--label 198.13.137.171=shreder.xyzA ready-to-edit run.sh is included in the repo.
Useful options
| Flag | Default | Description |
|---|---|---|
--interface | any | Capture interface. any captures all interfaces (Linux) |
--ports | 20000 | Comma-separated UDP destination ports |
--mode | raw-ports | raw-ports or raw-ips |
--shred-filter | all | all or clean (clean requires --rpc-url) |
--rpc-url | https://api.mainnet-beta.solana.com | RPC endpoint for the leader schedule (clean filter only) |
--report-interval-secs | 10 | Seconds between reports |
--settle-window-ms | 1000 | Hold shreds before scoring so slower copies can arrive |
--label | — | KEY=NAME friendly row names (repeatable) |
Clean shred filter
Some providers send unreconstructable / junk shreds that inflate win rates. With --shred-filter clean, signatures are verified against the slot leader and only verified shreds are scored:
sudo RUST_LOG=info ./target/release/solana-shred-perf \
--interface any \
--ports 20000 \
--mode raw-ips \
--shred-filter clean \
--rpc-url https://api.mainnet-beta.solana.comReading the table
- Matched — finalized shreds this key received
- Win % — share of shreds delivered first (higher = faster)
- p10–p99 — delay behind the winner (
0µswhen that key won) - Finalized / Pending — scored vs still inside the settle window
When exactly two keys are present, an A/B summary line is printed.
Benchmarking Shreder
- Send Shreder Raw Shreds and your other shred source to the same host.
- Use
raw-ips(shared port) orraw-ports(separate ports). - Add
--labelfor readable rows. - Compare Win %, p50, p90, and p99 over several report periods.
Repo: github.com/shrederxyz/solana-shred-perf
Methodology article: How to measure raw shred performance
Product: Raw Shreds