From 7989cfb36a7bf6afe2ea1ca60379071742c4db9f Mon Sep 17 00:00:00 2001 From: BayoNet Date: Thu, 12 Sep 2019 11:43:21 +0300 Subject: [PATCH] DOCAPI-7437: os_thread_priority docs (#6883) * Typo fix. * DOCAPI-7437: os_thread_priority docs * Update docs/en/operations/settings/settings.md Co-Authored-By: Ivan Blinkov * Update docs/en/operations/settings/settings.md Co-Authored-By: Ivan Blinkov * Update docs/en/operations/settings/settings.md Co-Authored-By: Ivan Blinkov --- docs/en/operations/settings/settings.md | 15 +++++++++++++++ docs/en/operations/system_tables.md | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index cbb1e02c44b..fce10da8f9b 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -894,4 +894,19 @@ Error count of each replica is capped at this value, preventing a single replica - [Table engine Distributed](../../operations/table_engines/distributed.md) - [`distributed_replica_error_half_life`](#settings-distributed_replica_error_half_life) +## os_thread_priority {#setting-os_thread_priority} + +Sets the priority ([nice](https://en.wikipedia.org/wiki/Nice_(Unix))) for threads that execute queries. OS scheduler considers this priority when choosing the next thread to run on each available CPU core. + +!!! warning "Warning" + To use this setting, you need to set the `CAP_SYS_NICE` capability. The `clickhouse-server` package sets it up during installation. Some virtual environments don't allow to set the `CAP_SYS_NICE` capability. In this case `clickhouse-server` shows a message about it at the start. + +Possible values: + +You can set values in the `[-20, 19]` range. + +The lower value means a higher priority. Threads with low values of `nice` priority are executed more frequently than threads with high values. High values are preferable for long running non-interactive queries because it allows them to quickly give up resources in favour of short interactive queries when they arrive. + +Default value: 0. + [Original article](https://clickhouse.yandex/docs/en/operations/settings/settings/) diff --git a/docs/en/operations/system_tables.md b/docs/en/operations/system_tables.md index 0b6481de3c1..85c6f755f87 100644 --- a/docs/en/operations/system_tables.md +++ b/docs/en/operations/system_tables.md @@ -62,7 +62,7 @@ Columns: Please note that `errors_count` is updated once per query to the cluster, but `estimated_recovery_time` is recalculated on-demand. So there could be a case of non-zero `errors_count` and zero `estimated_recovery_time`, that next query will zero `errors_count` and try to use replica as if it has no errors. -** See also ** +**See also** - [Table engine Distributed](table_engines/distributed.md) - [distributed_replica_error_cap setting](settings/settings.md#settings-distributed_replica_error_cap)