Updated on 2024-10-09 GMT+08:00

Configuring CPU Priority for ClickHouse Tenants

This section applies only to MRS 3.2.0 or later.

Scenario

ClickHouse tenants support CPU priorities. This feature depends on CAP_SYS_NICE of the OS and takes effect only after being enabled.

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 and choose Cluster > Services > ClickHouse. Click the Instance tab. Select all ClickHouseServer instances, and choose More > Restart Instance.
  3. 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