v.18.16Improvement

Added mlock feature for clickhouse-server to enhance memory protection

Added the ability to mlock memory pages corresponding to clickhouse-server executable code to prevent it from being forced out of memory. This feature is disabled by default. #3553
Added the ability to mlock memory pages corresponding to clickhouse-server executable code to prevent it from being swapped out of memory.

Why it matters

This feature aims to improve performance and stability by ensuring that the executable code of clickhouse-server remains in RAM and is not swapped out to disk, which can reduce latency caused by paging.

How to use it

The feature is disabled by default. To enable it, configure the appropriate system setting to allow mlock of the clickhouse-server executable memory pages according to your system and permissions.