v.20.5New Feature

Add Linux perf_events Query Performance Metrics in ClickHouse

Add query performance metrics based on Linux perf_events (these metrics are calculated with hardware CPU counters and OS counters). It is optional and requires CAP_SYS_ADMIN to be set on clickhouse binary. #9545 Andrey Skobtsov. #11226 (Alexander Kuzmenkov).
Introduces query performance metrics based on Linux perf_events, using hardware CPU counters and OS counters for detailed performance insights.

Why it matters

This feature provides more accurate and low-overhead query performance monitoring by leveraging Linux kernel perf events, helping users diagnose and optimize query execution using hardware-level metrics.

How to use it

To enable these metrics, the ClickHouse binary must have the CAP_SYS_ADMIN capability set. Once enabled, query performance data will include metrics collected via Linux perf_events.