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. 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.
Also, for more information about IAM roles, see IAM roles and permissions index and Manage access to projects, folders, and organizations.
View the health issue
To view the Expensive commands health issue, do the following:
In the Google Cloud console, go to the All resources page in Database Center.
Select the Products menu. In the Products dialog, do the following:
Optional: If any products are selected, then clear them.
In the Memorystore pane, select Redis Cluster 7.0.
Click Apply.
Select the Issues menu. In the Issues dialog, do the following:
Clear all selected issues.
In the Performance and capacity pane, select the Expensive commands health issue.
Click Apply. Database Center displays any clusters that have performance issues associated with expensive commands.
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.
To view detailed information about the health issue, click the expander arrow (expand_more) in the pane.
Address the health issue
To address the Expensive commands health issue, instead of using expensive
commands, use resource-efficient 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 metric and your
client-side logs. Check whether periods of high CPU utilization coincide with
the same periods when the expensive commands ran.