This page lists metrics that are available for Memorystore for Redis and describes what each metric measures.
To learn how to view these metrics, see Monitor instances .
Cloud Monitoring metrics
This section lists and describes Cloud Monitoring metrics that are available for Memorystore for Redis.
redis.googleapis.com/keyspace/avg_ttl
redis.googleapis.com/clients/blocked
This metric tracks the number of client connections that are
waiting for data to become available because blocking commands are running
in an instance. These blocking commands include BLPOP
, BRPOP
, and BRPOPLPUSH
. A high number of blocked clients might
indicate that your application is waiting on certain events or keys to be
populated.
You can monitor this metric to understand the behavior of your application, especially if you see unexpected increases in latency that might be tied to clients waiting on blocking operations.
redis.googleapis.com/replication/master/slaves/lag
This metric measures the number of seconds that a replica lags behind a primary instance. Memorystore for Redis calculates the value for the metric by taking the current time and subtracting the time at which the replica acknowledges receiving the message of incoming bytes.
You can use the metric to identify if a replica falls behind the primary instance.
redis.googleapis.com/replication/offset_diff
This metric tracks the number of bytes that aren't replicated to a replica. The metric represents the difference between the replication byte offset of a primary instance and the replication byte offset of the replica. If there's no difference between these offsets, then the replica is fully in synchronization with the primary instance.
As the primary instance replicates data to the replica during a failover process, you might notice an increase in these pending bytes.
redis.googleapis.com/stats/cache_hit_ratio
This metric represents the ratio of successful Redis database calls to unsuccessful calls. A call is successful when the Redis database returns the value that the caller requested.
A higher cache-to-hit ratio means that the cache is more fully utilized. This is beneficial for the performance of your application.
redis.googleapis.com/commands/calls
redis.googleapis.com/clients/connected
maxclients
limit, then the server might reject new connection attempts.redis.googleapis.com/stats/cpu_utilization
This metric measures the CPU usage time per minute that the Redis server uses. This time is broken down by the system-user space and the parent-child relationships.
The value for CPU seconds shows the total CPU seconds for all threads
of the Redis server's main process. If you want to see the CPU usage for
the main thread only, then view the Main Thread CPU Seconds
( cpu_utilization_main_thread
) metric.
High CPU utilization is a common cause for increased latency in Redis instances because it can lead to delays in command processing. By monitoring this metric, you can identify if a high load from numerous clients drives the CPU usage.
redis.googleapis.com/stats/evicted_keys
This metric shows the number of keys that Memorystore for Redis
evicts from an instance because the instance reaches the maxmemory
limit.
By monitoring this metric, you can determine if the instance's memory size is sufficient for your workload. If frequently accessed data is removed from the cache, then the key evictions can impact your application's performance.
redis.googleapis.com/keyspace/keys_with_expiration
redis.googleapis.com/keyspace/keys
redis.googleapis.com/stats/cpu_utilization_main_thread
redis.googleapis.com/stats/memory/maxmemory
maxmemory
)
that keys can use in an instance. After this limit is reached,
Memorystore for Redis evicts keys from the instance. This eviction
process occurs in accordance with the eviction policy that's configured
for the instance.redis.googleapis.com/stats/memory/usage_ratio
redis.googleapis.com/stats/keyspace_misses
This metric tracks the number of failed lookups of keys in the main dictionary. Every time a client attempts to access a key that doesn't exist in the database, the metric increments.
The metric is used to calculate the cache-to-hit ratio, which measures how effectively your application uses the cache. A high number of keyspace misses often indicates that the application is requesting data that isn't present in the cache. If the application has to fetch that data from a slower, backend datastore, then this can lead to increased latency.
redis.googleapis.com/replication/role
This metric returns a value that identifies the role of a node in a
replication group. A value of 1
indicates that the node is a
primary; a value of 0
signifies that the node is a replica.
You can use the metric to monitor the status of nodes, especially during failover events where roles might switch. In addition, you can track the health and topology of Standard Tier instances, which support high availability through replication.
redis.googleapis.com/persistence/rdb/bgsave_in_progress
This metric returns a value that identifies whether a background
save ( BGSAVE
) operation of the Redis database (RDB) is
active. A value of 1
indicates that a background RDB save is
active; a value of 0
signifies that no background save is
running.
You can use the metric to track automated RDB snapshots or manual exports. In addition, by monitoring the metric, you can correlate transient spikes in memory usage or latency with ongoing persistence tasks.
redis.googleapis.com/stats/pubsub/channels
SUBSCRIBE
or PSUBSCRIBE
commands.redis.googleapis.com/stats/pubsub/patterns
PSUBSCRIBE
command.redis.googleapis.com/stats/reject_connections_count
This metric tracks the number of connection attempts that an instance rejects because of the following reasons:
- The
maxclientslimit: the server reaches the maximum allowed number of concurrent client connections. - Memory pressure: the instance rejects new connections because of high memory utilization.
- An invalid TLS connection: an instance where in-transit encryption is enabled has TLS-related issues.
By monitoring the metric, you can identify capacity issues. If the number of rejected connections increases, then you might either need to scale the instance to handle more connections or increase the instance's memory capacity. In addition, when encryption is enforced, you can use the metric to help debug client-side connection issues.
redis.googleapis.com/replication/master_repl_offset
redis.googleapis.com/replication/master/slaves/offset
redis.googleapis.com/stats/memory/system_memory_usage_ratio
redis.googleapis.com/stats/memory/system_memory_overload_duration
This metric measures the total amount of time (in microseconds) that an instance is in system memory overload mode.
You can use the metric to track periods where the instance's memory usage exceeds safe operating thresholds for the system. Persistent values in the metric might indicate that the instance is at risk of performance degradation or instability because of insufficient memory for overhead processes.
redis.googleapis.com/commands/usec_per_call
This metric represents the average time spent for each Redis command call over one minute. This time is measured in microseconds.
The metric is broken down by individual commands. This lets you monitor
the performance of specific operations, such as GET
, SET
, and HSET
.
You can also use the metric to measure instance latency. By comparing the time per call at different points, you can identify changes in performance and investigate the causes of a latency discrepancy.
redis.googleapis.com/stats/connections/total
redis.googleapis.com/commands/total_time
redis.googleapis.com/stats/network_traffic
redis.googleapis.com/server/uptime
redis.googleapis.com/stats/memory/usage
Memorystore for Redis instance details metrics
The following metrics are available on the instance details page of your Memorystore for Redis instance :
| Metric name | Description |
|---|---|
| Memory Usage / Max Memory | A chart that shows memory usage compared to the maxmemory limit for your instance. |
| Evicted Keys / Expired Keys | A chart that displays the number of evicted keys and expired keys. |
| Connected Clients / Blocked Clients | A chart that displays the number of connected clients and blocked clients. |
| Network Bytes In/Out | A chart that displays the number of bytes sent and received by the instance over a given period. |
| CPU seconds | A chart that displays CPU seconds used by the instance over a given period of time. |
RDB Snapshots metrics
The following metrics help you manage RDB Snapshots for Memorystore for Redis.
Snapshot monitoring metrics
| Metric name | Full endpoint URL | Description |
|---|---|---|
|
Snapshot mode
|
redis.googleapis.com/rdb/enabled | Indicates if the RDB snapshot mode is enabled |
|
Next snapshot time
|
redis.googleapis.com/rdb/snapshot/time_until_next_run | Seconds until the next scheduled snapshot. |
Snapshot status metrics
| Metric name | Full endpoint URL | Description |
|---|---|---|
|
RDB snapshot in progress
|
redis.googleapis.com/rdb/snapshot/in_progress | Indicates if RDB snapshot is in progress. When the metric value is true, then an RDB snapshot is in progress. |
|
RDB snapshot elapsed time
|
redis.googleapis.com/rdb/snapshot/elapsed_time | Indicates increasing time elapsed while creating the current snapshot. |
|
RDB snapshot attempts count
|
redis.googleapis.com/rdb/snapshot/attempt_count | Indicates number of snapshot attempts every minute. |
|
RDB snapshot last status
|
redis.googleapis.com/rdb/snapshot/last_status | Indicates status of the most recent snapshot attempt. |
|
RDB snapshot duration
|
redis.googleapis.com/rdb/snapshot/last_success_duration | Indicates the total time required to write the last successful snapshot, not including failed attempts. |
|
RDB snapshot age
|
redis.googleapis.com/rdb/snapshot/last_success_age | Indicates time elapsed since the start of the last successful snapshot. |
Snapshot recovery metrics
| Metric name | Full endpoint URL | Description |
|---|---|---|
|
RDB recovery in progress
|
redis.googleapis.com/rdb/recovery/in_progress | Indicates if recovery from an RDB snapshot is in progress. When the metric value is true, then a recovery is in progress. |
|
RDB recovery elapsed time
|
redis.googleapis.com/rdb/recovery/elapsed_time | Indicates increasing time elapsed for an in-progress recovery from an RDB snapshot. |
|
RDB recovery estimated time
|
redis.googleapis.com/rdb/recovery/estimated_recovery_time | Indicates the expected recovery time when using the last successful snapshot for recovery. |
|
RDB recovery remaining time
|
redis.googleapis.com/rdb/recovery/estimated_remaining_time | Indicates remaining time to finish recovery from an RDB snapshot. |
|
RDB recovery attempts
|
redis.googleapis.com/rdb/recovery/attempts_since_last_success | Indicates number of recovery attempts since the last successful recovery attempt. |
|
RDB recovery last status
|
redis.googleapis.com/rdb/recovery/last_status | Indicates status of the most recent recovery. |
|
RDB recovery last duration
|
redis.googleapis.com/rdb/recovery/last_duration | Indicates time it took to restore the last snapshot. |
|
RDB Snapshot Size
|
redis.googleapis.com/rdb/recovery/total_bytes_count | Indicates the size of the snapshot. |
|
RDB Load progress
|
redis.googleapis.com/rdb/recovery/loaded_bytes_count | During a recovery, indicates how many bytes have loaded. 0 if the recovery is not active. |

