Updated on 2025-08-22 GMT+08:00

Configuring CPU Priority for ClickHouse Tenants

Scenarios

ClickHouse supports CPU prioritization for tenants, allowing different tenants to be assigned varying CPU priority levels. This enables more efficient allocation and utilization of CPU resources in multi-tenant environments. This feature relies on the OS capability CAP_SYS_NICE and takes effect only when it is enabled.

Notes and Constraints

This section applies only to MRS 3.2.0-LTS or later.

Procedure

  1. Log in to the ClickHouseServer node as user root and run the following command:

    setcap cap_sys_nice=+ep /opt/Bigdata/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/bin/clickhouse

    You need to run this command on all ClickHouseServer nodes.

  2. Log in to FusionInsight Manager.

    For details, see Accessing FusionInsight Manager.

  3. Choose Cluster > Services > ClickHouse and click Instances. Select all ClickHouseServer instances, and choose More > Restart Instance or Instance Rolling Restart to restart all ClickHouseServer instances.

    Instances are unavailable during the restart, affecting upper-layer services in the cluster. To minimize the impact, perform this operation during off-peak hours or after confirming that the operation does not have adverse impact.

  4. Log in to the ClickHouseServer instance node as user root and run the following command to check whether the CPU priority feature is enabled:

    getcap /opt/Bigdata/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/bin/clickhouse
    The following command output indicates that the feature has been enabled:
    /opt/Bigdata/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse*/clickhouse/bin/clickhouse = cap_sys_nice+ep