4 ms·
Wondering if there is any guide to programming and accurately measuring low latency stuff. I am working on some low level memory management code and would like
by pca006132 4y ago
Wondering if there is any guide to programming and accurately measuring low latency stuff. I am working on some low level memory management code and would like to see the latency behavior, but I always get several microseconds of standard deviation (~10%) when I try to benchmark it.
I am pinning the cores, disabled SMT and turbo boost, but haven't tried isolcpu because this has to reboot the computer.
- vgatherps 4y agoReally? With Google Bench or Criterion I've gotten pretty good resolution on microbenchmarks The gold standard (in my experience) for latency measurement is setting up a packet splitting, marking your outbound packets with some hash/id of the inbound packet, taking hardware timestamps of all these on some dedicated host, and putting it all together after the fact. Ultimately packet-in to packet out is all the matters anyways You can actually get pretty solid internal timestamps (how long did I take to fully process event X) with TSC counters, but you then have a coordinated omissions problem: https://www.programmingtalks.org/talk/how-not-to-measure-latency-by-gil-tene https://www.programmingtalks.org/talk/how-not-to-measure-lat...
- deadcanard 4y agoHave you tried one the link of the article: https://docs.kernel.org/admin-guide/kernel-per-CPU-kthreads.html https://docs.kernel.org/admin-guide/kernel-per-CPU-kthreads....? Also try running "perf stat -d" on your run and see anything pops out