v.21.7Improvement

Resource Constraints and Isolation for ODBC and Library Bridges in ClickHouse

Resource constraints and isolation for ODBC and Library bridges. Use separate clickhouse-bridge group and user for bridge processes. Set oom_score_adj so the bridges will be first subjects for OOM killer. Set set maximum RSS to 1 GiB. Closes #23861. #25280 (Kseniia Sumarokova).
Introduces resource constraints and process isolation for ODBC and Library bridges in ClickHouse by assigning them to a dedicated clickhouse-bridge user and group, setting memory limits, and adjusting priorities for the OOM killer.

Why it matters

This feature aims to improve stability and reliability by preventing ODBC and Library bridge processes from consuming excessive system resources. By isolating these processes and limiting their maximum RSS to 1 GiB, it reduces the risk of these bridges impacting the rest of the ClickHouse system or being abruptly terminated without control.

How to use it

The feature applies automatically by running bridge processes under the new clickhouse-bridge user and group. The system sets oom_score_adj to prioritize these processes for OOM killing and enforces a maximum RSS memory limit of 1 GiB. Users need to ensure their environment supports these user/group settings and resource limits.