You might use Redis commands that are resource-intensive. As either your total
data size or the size of a key increases, so does the cost of using these
commands. Using the commands might result in the following performance issues:

- High latency and client timeouts
- Memory pressure caused by commands that increase memory usage
- Data loss during node replication and synchronization because the Redis main thread is blocked
- Starved health checks, observability, and replication

To resolve these performance issues, use the **Expensive commands** health
issue. To access this health issue, use the [Database Center](https://docs.cloud.google.com/database-center/docs/overview.md.txt).
This is an AI-assisted dashboard that gives you a centralized view of health
issues for clusters.

## Before you begin

Before you begin to use the **Expensive commands** health issue, complete the
prerequisites in this section.

### Assign roles and permissions

To use Database Center to view and work with health issues, you
must be granted IAM permissions for
Database Center. For more information about getting these
permissions, see [Grant IAM permissions](https://docs.cloud.google.com/database-center/docs/set-up-database-center.md.txt#grant-iam-permissions).

Also, for more information about IAM roles, see [IAM roles and permissions index](https://docs.cloud.google.com/iam/docs/understanding-roles) and [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).

## View the health issue

To view the **Expensive commands** health issue, do the following:

1. In the Google Cloud console, go to the **All resources** page in Database Center.

   [All resources](https://console.cloud.google.com/database-center/resources)
2. Select the **Products** menu. In the **Products** dialog, do the following:

   1. Optional: If any products are selected, then clear them.

   2. In the **Memorystore** pane, select **Redis Cluster 7.0**.

   3. Click **Apply**.

3. Select the **Issues** menu. In the **Issues** dialog, do the following:

   1. Clear all selected issues.

   2. In the **Performance and capacity** pane, select the **Expensive commands**
      health issue.

   3. Click **Apply**. Database Center displays any clusters that
      have performance issues associated with expensive commands.

4. Click the issue, which appears next to the name of a cluster. The
   **Expensive commands** health issue opens in a separate pane.

   If the issue doesn't appear next to the cluster, then you aren't using
   expensive commands for the cluster.
5. To view detailed information about the health issue, click the expander arrow
   () in the pane.

## Address the health issue

To address the **Expensive commands** health issue, instead of using expensive
commands, use [resource-efficient](https://docs.cloud.google.com/memorystore/docs/cluster/general-best-practices.md.txt#resource-intensive-redis-commands) commands. For example,
to remove files and links, an alternative to the expensive `DEL` command is the
resource-efficient `UNLINK` command.

In addition, use Cloud Monitoring to view the [`/cluster/cpu/maximum_utilization`](https://docs.cloud.google.com/memorystore/docs/cluster/supported-monitoring-metrics.md.txt#cloud-monitoring-cluster-metrics) metric and your
client-side logs. Check whether periods of high CPU utilization coincide with
the same periods when the expensive commands ran.

## What's next

- [Resource-intensive Redis commands](https://docs.cloud.google.com/memorystore/docs/cluster/general-best-practices.md.txt#resource-intensive-redis-commands)
- [Supported monitoring metrics](https://docs.cloud.google.com/memorystore/docs/cluster/supported-monitoring-metrics.md.txt)