Option to filter out small allocations in statistics to avoid getting extra stacks

Jason Evans jasone at canonware.com
Mon Mar 17 11:38:49 PDT 2014


On Mar 17, 2014, at 1:13 AM, Evgeniy Ivanov <i at eivanov.com> wrote:
> We use opt.prof_accum to profile memory allocations. Sometimes performance degradation is too high because getting stacks is a heavy operation. In resulting backtraces we see some relatively small allocations we are not interested in. With DTrace our usual case is to cut allocations smaller than 16 KB. I would like to add option to cut allocations smaller, than specified one, e.g. "opt.prof_cut" (ssize_t). Will it be accepted upstream?

The way to reduce backtracing overhead is to increase the sample interval, e.g. MALLOC_CONF=lg_prof_sample:20 doubles the default from an average of one sample per 2^19 bytes (512 KiB) to 2^20 bytes (1 MiB).  If you systematically ignore small allocations you bias the sample, which invalidates the math that allows sample-based profiling to converge on reality.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jemalloc.net/mailman/jemalloc-discuss/attachments/20140317/1c7d7922/attachment.html>


More information about the jemalloc-discuss mailing list