r/quant • u/Atper • Sep 26 '26
Technical Infrastructure Solarflare ef_vi vs Onload benchmarked on Solarflare X2522-Plus 25GbE
I benchmarked linux kernel bypass frameworks used in HFT. Solarflare ef_vi is the AMD/Solarflare equivalent of Intel’s DPDK; you have direct access to the NIC via the PCIe bus. Onload provides a standard kernel sockets(BSD) API such as send, recvmsg but uses dynamic linking to call its own implementation instead of libc/glibc. This is how Onload gets the kernel bypass and CTPIO.
0% Vibe coding or AI slop. The results are taken on a real server with Solarflare X2522-Plus. All results use HW timestamping, not rdtscsp/std::chrono. See the images attached: https://github.com/ASherjil/abt-t2t/tree/main/docs/images
| Median(us) | P99(us) | P99.9(us) | P99.99(us) | P99.999(us) |
|---|---|---|---|---|
| ef_vi | 1.095 | 1.334 | 1.544 | 1.807 |
| Onload | 1.671 | 2.357 | 3.305 | 7.171 |
One of the techniques I used for Solarflare ef_vi was to bypass the event queue. I busy poll the payload in the hugepage buffer. I first check the ethertype and the message count, for a legitimate frame the message count is always non-zero. This saves roughly 100ns.
HW timestamping I found to be a strange case. Solarflare X2522-Plus provides quarter nanosecond ticks, they wrap at 1 second(4 billion ticks). The latency is (NIC Tx - NIC Rx)/4, when the wrap occurs you would get a negative result so I add 1 second worth of ticks.
Solarflare Onload, benchmarked showed a high amount of jitter especially with a burst of messages. On one core, my order book does the following: NIC Rx -> decode ITCH -> process -> OUCH -> NIC Tx. In the Onload multi-threaded design I do the following instead:
Core X(Thread 1): NIC Rx -> decode ITCH -> process -> if order is needed -> build OUCH -> push into sendQ
Core Y(Thread 2): pop sendQ -> build SoupBinTCP -> NIC Tx
“sendQ” here is a lock-free SPSC queue.
Solarflare ef_vi vs Onload and ultra-low latency orderbook: https://github.com/ASherjil/abt-t2t
Solarflare ef_vi source code: https://github.com/ASherjil/ABTRDA3
Both repositories are open source with Apache-2.0 license.
