“How to tune a server/Linux for low latency” is a question that gets asked a lot. In most cases,
There are a few guides online: search “low latency tuning guide” or “HP/Supermicro low latency tuning guide”. However, they’re quite disorganized and dated — mostly written around the Sandy Bridge to Haswell generation and before isolcpus was deprecated.
This is a simple cheatsheet that consolidates these tweaks into 1 page.
Additional notes
- This is not meant to be a standalone reference, as you’ll need to read up how to apply these changes in your kernel configs or CLI. Those instructions vary with distro, manufacturers, and age of your system, so we find it’s better to give general strategies than to mislead with specific commands or config params.
- This is also not an exhaustive list of possible optimizations. Indeed, you can go further, but these are the lowest-hanging ones that we can squeeze onto a one-pager. More importantly, unlike the other guides, we have validated these numbers with up-to-date, real-world benchmarks here.
- You should be able to get 0.973/1.093/3.042us (0/50/99p) one-way with these changes alone and mid-spec hardware ($5,000 to $15,000 server, X2522 NIC, AMD EPYC system circa 2022–2024).
- The 0th percentile shows that these aren’t reaching the advertised potential of the NIC. You can easily beat these with a faster-clocked server and a few other kernel tweaks — and of course PCIe 4.0 on a X3522.