[Yandex Cloud documentation](../index.md) > [Yandex Managed Service for ClickHouse®](index.md) > Inspections and recommendations

# Inspections and recommendations in Managed Service for ClickHouse® 

Managed database clusters regularly undergo diagnostics to detect possible issues, increase the cluster's reliability, and improve its performance. The results of such checks are displayed as inspections under **Recommendations**. You can see notifications about successful checks and recommendations on eliminating discovered risks. The responsibility to troubleshoot any detected issues lies within the Yandex Cloud user's [remit](../overview/concepts/mdb-responsibilities.md).

All checks have a severity level:

* High level: Criteria of high cluster availability, significant risks of reduced performance, data loss risks. Such checks warrant special attention and require following the recommendations provided. 
* Moderate level: Possible risks of reduced performance, suboptimal memory and disk space usage.
* Low level: Potential risks and cluster operation limitations.

The list of recommendations is updated regularly. For each recommendation, the following timestamps are fixed: the date of the risk's first detection and the date of the most recent status update on this issue. If the recommendation seems to be excessive or incorrect, you can hide it, specifying a reason. Once the hiding period expires, the recommendation will automatically become available again if the issue persists.

Recommendations are available at the cluster, folder, and cloud levels and provide tips for all your resources. However, the absence of recommendations does not mean that your cluster is optimized: the list of checks gets continuously appended but still remains incomprehensive and cannot replace monitoring, since it is **targeted at detecting patterns rather than specific issues**. You can additionally run cluster performance diagnostics and analyze monitoring metrics.

Managing recommendations in Managed Service for ClickHouse® requires the [managed-clickhouse.editor role or higher](security.md).

## Available inspections in Managed Service for ClickHouse® {#mch-recommendations}

| **Category** | **Check** | **Risk** | **Severity** |
|---------------------|----------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------|
| Performance  | CPU usage                                       | [High CPU usage on the host](#clickhouse_cpu_idle)                                               | High         |
| High availability | Allocating disk space | [Insufficient disk space](#clickhouse_disk_free_space) | High       |
| High availability | Hosting the coordination service on separate hosts | [Risk of unavailability due to hosting the coordination service on hosts](#clickhouse_ha_embedded_keeper) | High         |
| High availability | High shard availability | [Risk of data loss and cluster unavailability if an availability zone fails](#clickhouse_ha_shard) | High         |
| High availability | Coordination service quorum in case of a zone failure | [Risk of losing the coordination service quorum in the event of a zone failure](#clickhouse_ha_keeper) | High          |


### High CPU usage on the host {#clickhouse_cpu_idle}

**Description**

The host continuously uses all CPU resources, which may cause delays in query processing. Check the [load](operations/performance-diagnostics.md) and optimize your queries (which may include using the WebSQL [AI assistant](../websql/operations/ai-assistant.md)) or increase the cluster's computing resources.

**Action**

To increase the cluster's computing resources:

1. [Navigate to](../console/operations/select-service.md#select-service) **Managed Service for&nbsp;ClickHouse**.
1. Select your cluster and click ![image](../_assets/console-icons/pencil.svg) **Edit**.
1. Under **Resources**, select a host class with the required amount of vCPUs.
1. Click **Save changes**.

### Insufficient disk space {#clickhouse_disk_free_space}

**Description**

Your host is critically low on free space. The cluster may become unavailable. Increase the disk size or clear unused data.

**Action**

To increase the disk size:

1. [Navigate to](../console/operations/select-service.md#select-service) **Managed Service for&nbsp;ClickHouse**.
1. Select your cluster and click ![image](../_assets/console-icons/pencil.svg) **Edit**.
1. Under **Storage size**, increase the disk size.
1. Click **Save changes**.

### Risk of unavailability due to hosting the coordination service on hosts {#clickhouse_ha_embedded_keeper}

**Description**

A configuration where ClickHouse® and ClickHouse® Keeper share the hosts is not highly available. Place ClickHouse® Keeper on separate hosts.


{% note info %}

Single-host clusters are excluded from high availability testing: Yandex Cloud users are fully responsible for managing such a configuration.

{% endnote %}

**Action**

To update the ClickHouse® Keeper settings:

1. In the [management console](https://console.yandex.cloud), navigate to the folder dashboard and select **Managed Service for&nbsp;ClickHouse**.
1. Select your cluster and click **Edit** in the top panel.
1. For the **ClickHouse Keeper (on separate hosts)** coordination service, select the platform, VM type, and [host class](concepts/instance-types.md) under **Clickhouse Keeper host class**. 

### Risk of data loss and cluster unavailability if an availability zone fails {#clickhouse_ha_shard}

**Description**

* The shard has no replicas, which poses a risk of data loss and cluster unavailability. Make sure the specified shards have replicas in another zone.
* The current distribution of shard hosts does not ensure fault protection in a single availability zone. Make sure the replicas are distributed across different availability zones.

**Action**

To move ClickHouse® hosts:

1. In the [management console](https://console.yandex.cloud), select the folder containing the cluster.
1. [Navigate](https://console.yandex.cloud/link/managed-clickhouse) to **Managed Service for&nbsp;ClickHouse**.
1. Click the cluster name and navigate to the **Hosts** tab.
1. Click **Create host**.
1. Specify the following host settings:

    * Target availability zone for your hosts.
    * New subnet.
    * To make the host accessible from outside Yandex Cloud, select **Public access**.

1. Click **Save**.

For more information, see [this host migration guide](operations/host-migration.md).

### Risk of losing the coordination service quorum in the event of a zone failure {#clickhouse_ha_keeper}

**Description**

Your coordination service hosts are distributed unevenly: one of the availability zones has too few hosts to form a quorum. If that zone fails, the remaining hosts may lose quorum, blocking leader elections and stopping normal cluster operation. Distribute your hosts across zones so that losing any single zone does not lead to a loss of quorum.

**Action**

To move ZooKeeper hosts:

1. Create a subnet in the target availability zone for the hosts.
1. In the [management console](https://console.yandex.cloud), select the folder containing the cluster.
1. [Navigate](https://console.yandex.cloud/link/managed-clickhouse) to **Managed Service for&nbsp;ClickHouse**.
1. Click the cluster name and navigate to the **Hosts** tab.
1. Click **Set up coordinator service**.
1. Specify the new subnet and the availability zone to move the hosts to.
1. Click **Save**.

For more information, see [this host migration guide](operations/host-migration.md).