v.25.9New Feature

Improve allocation profiling based on jemalloc's

Improve allocation profiling based on jemalloc's internal tooling. Global jemalloc profiler can now be enabled with config jemalloc_enable_global_profiler. Sampled global allocations and deallocations can be stored in system.trace_log under JemallocSample type by enabling config jemalloc_collect_global_profile_samples_in_trace_log. Jemalloc profiling can now be enabled for each query independently using setting jemalloc_enable_profiler. Storing samples in system.trace_log can be controlled per query using setting jemalloc_collect_profile_samples_in_trace_log. Update jemalloc to newer version. #85438 (Antonio Andelic).
Enhanced jemalloc allocation profiling with options for global and per-query profiling, including sampled allocation logging to system.trace_log.

Why it matters

This feature improves memory allocation profiling by leveraging jemalloc's internal tools to provide detailed insights into allocation and deallocation patterns. It allows users to enable global or per-query jemalloc profiling, helping to diagnose and optimize memory usage effectively. Sampling allocation data into the system.trace_log enables easier analysis and debugging of memory behaviors.

How to use it

To enable global jemalloc profiling, set the configuration jemalloc_enable_global_profiler to true. To collect sampled global allocation and deallocation data into the trace log, enable jemalloc_collect_global_profile_samples_in_trace_log. For per-query profiling, use the query setting jemalloc_enable_profiler. To store per-query sampled profiles in system.trace_log, configure jemalloc_collect_profile_samples_in_trace_log per query.