Choosing CPU sampling interval #801
-
Hi everyone, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
10ms is pretty standard for sampling profilers: it's the default interval used by Go, VTune, and the async profiler for Java. Py-spy also uses a 10ms rate. We also used 10ms in our Coz causal profiler. This rate empirically strikes a sweet spot providing high accuracy and low overhead (for Scalene, see the graph of Figure 5 from our OSDI paper demonstrating that Scalene's choice delivers high accuracy). There are a few notable departures from this default: v8's profiler uses a 1ms interval. I just tried perf and while the linked page says it uses a 1ms interval, on my system, it was more like 0.2ms. Austin also uses a default of 0.1ms. |
Beta Was this translation helpful? Give feedback.
10ms is pretty standard for sampling profilers: it's the default interval used by Go, VTune, and the async profiler for Java. Py-spy also uses a 10ms rate. We also used 10ms in our Coz causal profiler.
This rate empirically strikes a sweet spot providing high accuracy and low overhead (for Scalene, see the graph of Figure 5 from our OSDI paper demonstrating that Scalene's choice delivers high accuracy).
There are a few notable departures from this default: v8's profiler uses a 1ms interval. I just tried perf and while the linked page says it uses a 1ms interval, on my system, it was more like 0.2ms. Austin also uses a default of 0.1ms.