News for hackers. Stuff that matters.
Re:Comparison of Rust async and Linux thread context switch ... by bitcharmer on Friday February 12, 2021 @07:37AM (#26112980)
You have to do so much more to be able to reliably measure events on the scale of nanos. You need to lock C-states, disable P-state driver, isolate CPUs, get rid of RCUs, affinitize your tasks, enable low-tick mode, skew hr ticks, make sure you use TSC clocksource, set the cpu governor, get rid of vmstat, set correct idle driver, disable audits, and watchdogs and much, much more.
Re:Comparison of Rust async and Linux thread context switch ... by the8472 on Friday February 12, 2021 @10:30AM (#26114709)
If you want to instrument only a handful events, yes. But for microbenchmarks which you can run for many iterations to get min/max/stdev (such as the benchmarks in the article) it's much easier. Disabling turbo often is sufficient to lower the variance far enough that old and new code are clearly distinguishable.
Re:Comparison of Rust async and Linux thread context switch ... by bitcharmer on Friday February 12, 2021 @01:27PM (#26116791)
It has nothing to do with instrumenting and everything to do with platform noise.
Re:Comparison of Rust async and Linux thread context switch ... by secondcoming on Monday February 15, 2021 @05:38PM (#26148516)
+1 This guy profiles