v.21.11Improvements

Enable Global Per-Query Memory Profiler with 4MiB Step

Enable per-query memory profiler (set to memory_profiler_step = 4MiB) globally. #29455 (Azat Khuzhin).
Enabled a per-query memory profiler in ClickHouse, with a default profiling step size of memory_profiler_step set to 4MiB globally.

Why it matters

The feature introduces a detailed memory profiling mechanism for each query, allowing users to monitor memory allocation increments in steps of 4MiB. This helps in identifying memory consumption patterns and diagnosing memory-related performance issues more effectively.

How to use it

The per-query memory profiler is enabled globally by default with a step size of 4MiB. Users can control the profiling granularity by adjusting the memory_profiler_step setting in the server configuration or session settings.