|
|
|
|
|
by finnh
360 days ago
|
|
> Enabling allocation sampling profiling with a sampling period of 4 MB leads to a maximum time overhead of 25% in our benchmarks, over un-profiled regular execution 25% is not low overhead, but perhaps this example is the worse case and other tunings actually are low overhead. There's no exact definition I don't think, but anything much over 3% starts to feel like a lot of overhead to me. Reading on: > Our main technical insight is that the check whether an allocation should be sampled can be made free. This is done by folding it into the bump-pointer allocator check that PyPy’s GC uses to find out if it should start a minor collection. In this way the fast path with and without memory sampling are exactly the same. That is cool, and means you only pay for the samples you produce = something you could leave enabled confidently, with a low-enough sample rate at least. |
|
[0] https://www.snellman.net/blog/archive/2006-05-14-statistical...