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
- 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.
- Log in to FusionInsight Manager.
For details, see Accessing FusionInsight Manager.
- 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.
- 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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot