ApsaraDB for Redis supports a variety of performance metrics. You can query the monitoring data of a Redis instance during a specified period of time in the last month. This helps you gain insights into the status of the Redis instance and troubleshoot issues.
Procedure
Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the left-side navigation pane, click Performance Monitor.
Perform the following operations based on the architecture of the instance:
If the instance uses the master-replica architecture, you only need to pay attention to the metrics of the master node.
If the instance uses the cluster or read/write splitting architecture, you have the following options:
On the
tab, you can view the overall performance of the instance. Metrics on the All tab provide the aggregated monitoring data of replica nodes or read replicas. Different metrics use different aggregate methods such as taking the average or sum value. For example, the CPU utilization on the All tab is the average value of all replica nodes or read replicas.On the
tab, you can view the monitoring metrics of each data node.
If your instance has proxy nodes, you can view the overall performance of the proxy nodes on the
tab and view the monitoring metrics of each proxy node on the tab.
NoteYou can view the monitoring data within the last month. In most cases, the maximum time range that you can specify for a query is three days. For a cluster instance that has 32 data shards or more, the maximum time range that you can specify for an aggregate query is one day.
To view the description of a metric, move the pointer over the
icon in the upper-left corner of the trend chart.
To ensure a smooth and efficient performance monitoring experience and prevent negative impacts on the operation of your Tair instance, the granularity of data displayed in the trend charts varies based on the time range that you select.
For read/write splitting instances of Redis, read replicas are not counted towards the metrics that use an aggregate method.
Metrics that are supported for instances of different architectures and their descriptions are displayed in the console.
Related API operations and monitoring parameters
API operation | Description |
Queries the performance monitoring history of an instance of Redis. |
When you call the operation, you must specify the parameters in the MonitorKeys column of the following table. The system returns submetrics. Redis instances support general monitoring metrics and command-related monitoring metrics.
General monitoring metrics
In this example, the CpuUsage metric is used to describe how to use a general monitoring metric.
To query the overall CPU utilization of all data nodes, you must specify CpuUsage$db.
To query the CPU utilization of a single data node, you must specify CpuUsage and NodeId.
To query the overall CPU utilization of all proxy nodes, you must specify CpuUsage$proxy.
To query the CPU utilization of a single proxy node, you must specify CpuUsage and NodeId.
MonitorKeys | Submetric | Unit | Description | Applicable scope |
CpuUsage | CpuUsage | % | The CPU utilization. Valid values: 0 to 100. Note If the RedisCpuUsage parameter is specified or returned for your instance in the previous request, you can continue to use the parameter. |
|
MemoryUsage | memoryUsage | % | The memory usage. |
|
quotaMemory | quotaMemory | Bytes | The total memory of the data shard. |
|
UsedMemory | UsedMemory | Bytes | The amount of used memory, which includes the memory consumed by data and cache. |
|
Tair_PmemUsage | PmemUsage | % | The Persistent Memory (PMem) usage, the amount of PMem used, and the total amount of PMem. These submetrics are available only for persistent memory-optimized instances. |
|
Tair_Pmem | PmemUsed | Bytes | ||
PmemQuota | Bytes | |||
Redis_DetailedSpaceUsage | ins_size | MB | The total disk space used by the instance, the disk space used by data files such as append-only files (AOFs) and Redis database (RDB) files, and the disk space used by logs such as active logs. These submetrics are available only for DRAM-based instances that use the classic (local disk-based) deployment mode. |
|
data_size | MB | |||
log_size | MB | |||
Redis_Memory_Monitor | used_memory_rss | Bytes | The physical memory used by the process, which is the memory allocated by the operating system to Tair. |
|
used_memory_lua | Bytes | The amount of memory used by Lua scripts. | ||
used_memory_startup | Bytes | The amount of memory used by Tair during startup. | ||
lazyfree_pending_objects | Counts | The number of keys pending to be reclaimed when Tair performs lazy free operations. | ||
used_memory_overhead | Bytes | The amount of memory that is used to support the internal mechanisms of Tair for maintaining datasets, including the output buffers, query buffers, and AOFs for all clients. | ||
used_memory_dataset | Bytes | The amount of memory used by data. | ||
UsedQPS | TotalQps | Counts/s | The total number of requests per second, including both read and write requests. |
|
GetQps | Counts/s | The number of read requests per second and the number of write requests per second. These submetrics are available only for instances that run Redis 4.0 or later. | ||
PutQps | Counts/s | |||
OtherOps | Counts/s | The number of non-read/write requests per second, such as PING, INFO, SELECT, and AUTH requests. For instances that contain proxy nodes, the OtherOps submetric indicates only the number of INFO requests per second. | ||
ConnectionUsage | connectionUsage | % | The connection usage, which is calculated by using the following formula: Number of used connections/Number of total supported connections. When the client connects to the cluster instance of Redis by using a private endpoint, this submetric is meaningful. |
|
UsedConnection | ConnCount | Counts | The number of used connections. | |
QPSUsage | qpsUsage | % | The queries per second (QPS) usage. |
|
IntranetIn | InFlow | KB/s | The inbound and outbound traffic rates. |
|
IntranetOut | OutFlow | KB/s | ||
IntranetInRatio | intranetInRatio | % | The inbound and outbound traffic usage. |
|
IntranetOutRatio | intranetOutRatio | % | ||
Redis_Avg_Rt_Monitor | AvgRt | us | The average response time of all commands, which indicates the average time that is measured from the time when a data node receives a command to the time when the data node returns the command output. |
|
Redis_Max_Rt_Monitor | MaxRt | us | The maximum latency for commands, which indicates the maximum time period from the time when the replica node receives a command to the time when the replica node returns the command output. | |
Redis_Basic_Monitor | Keys | Counts | The total number of keys, which indicates the number of primary keys stored in the instance. |
|
Expires | Counts | The number of keys that has a time to live (TTL) value configured. This submetric displays the instantaneous value when data is collected. | ||
ExpiredKeys | Counts | The cumulative number of expired keys. | ||
EvictedKeys | Counts | The cumulative number of evicted keys. | ||
ExpiredKeysPerSecond | Counts/s | The number of keys that are expired per second. | ||
EvictedKeysPerSecond | Counts/s | The number of keys that are evicted per second. | ||
inmem_keys | Counts | These submetics are available only for hybrid-storage instances (phased out). You can ignore these submetrics. | ||
swapped_keys | Counts | |||
Hit_Rate_Monitor | hit_rate | % | The hit ratio of keys, which is calculated by using the following formula: Total key hits/(Total key hits + Total key misses). |
|
hit | Counts | The number of key hits per second. | ||
miss | Counts | The number of key misses per second. | ||
evicted_keys_per_sec | Counts | The number of keys that are evicted per second. | ||
DiskUsage | disk_usage | % | The disk space usage, the size of the input buffer, the size of the output buffer, and the monitoring metrics related to disk performance. These submetics are available only for ESSD-based instances. |
|
RocksDBConn | Tair_Connection_Monitor | Bytes | ||
Tair_Connection_Monitor | Bytes | |||
Tair_Disk_Monitor | Submetrics such as io_bandwidth_kbps, iops, and iops_usage | Units such as % and ms | ||
UsedConnection | ConnectionUsage | % | The connection usage, which is calculated by using the following formula: Number of used connections/Number of total supported connections. If the client connects to the cluster or read/write splitting instance of Redis by using proxy nodes, this submetric is meaningful. |
|
UsedConnection | Counts | The number of used connections. | ||
NewUserConnQps | Counts/s | The number of connections that are established per second from clients to proxy nodes. | ||
Redis_Package_Monitor | request | Byte | The average bytes of a single request. |
|
response | Byte | The average bytes of a single response. | ||
request_max | Byte | The maximum bytes of a single request. | ||
response_max | Byte | The maximum bytes of a single response. | ||
RedisProxyConn | RedisUsedConnection | Counts | The number of connections that are established from proxy nodes to data nodes. | |
NewDBConnQps | Counts/s | The number of connections that are established per second from proxy nodes to data nodes. | ||
DisconnectDBConn | Counts | The cumulative number of disconnections from proxy nodes to data nodes. | ||
DisconnectUserConn | Counts | The cumulative number of disconnections from clients to proxy nodes. | ||
TotalCalls | TotalRefusedCommands | Counts | The cumulative number of rejected commands. | |
TotalCallsPerSecCalls | Counts/s | The QPS. | ||
TotalCallsPerSecRetryCalls | Counts/s | The number of request retries per second. | ||
TotalCallsPerSecRetryFailed | Counts/s | The number of failed requests per second. |
Command-related monitoring metrics
Command-related monitoring metrics are supported only when you query a specific database. When you query the monitoring data of a specific database, you must specify the MonitorKeys and NodeId parameters.
Monitoring metrics related to extended data structures of Tair are available only for DRAM-based instances that use the classic (local-disk based) deployment mode.
MonitorKeys | Submetric | Unit | Description |
Redis_Keys_Monitor | del, dump, exists, expire, expireat, move, persist, pexpire, pexpireat, pttl, randomkey, rename, renamenx, restore, sort, ttl, type, and scan | Counts/s | The monitoring information about the use of key-value related commands, such as the number of times DEL and EXITS are executed per second. |
Redis_String_Monitor | append, bitcount, bitop, decr, decrby, get, getbit, getrange, getset, incr, incrby, incrbyfloat, mget, mset, msetnx, psetex, set, setbit, setex, setnx, setrange, and strlen | Counts/s | The monitoring information about the use of string-related commands, such as the number of times APPEND and MGET are executed per second. |
Redis_Hashes_Monitor | hdel, hexists, hget, hgetall, hincrby, hincrbyfloat, hkeys, hlen, hmget, hmset, hset, hsetnx, hvals, and hscan | Counts/s | The monitoring information about the use of hash-related commands, such as the number of times HGET and HDEL are executed per second. |
Redis_Lists_Monitor | blpop, brpop, brpoplpush, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, and rpushx | Counts/s | The monitoring information about the use of list-related commands, such as the number of times BLPOP and BRPOP are executed per second. |
Redis_Sets_Monitor | sadd, scard, sdiff, sdiffstore, sinter, sinterstore, sismember, smembers, smove, spop, srandmember, srem, sunion, sunionstore, and sscan | Counts/s | The monitoring information about the use of set-related commands, such as the number of times SADD and SCARD are executed per second. |
Redis_Zset_Monitor | zadd, zcard, zcount, zincrby, zrange, zrangebyscore, zrank, zrem, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebyscore, zrevrank, zscore, zunionstore, zinterstore, zscan, zrangebylex, zlexcount, zremrangebylex, zpopmin, zpopmax, bzpopmin, and bzpopmax | Counts/s | The monitoring information about the use of zset-related commands, such as the number of times ZADD and ZCARD are executed per second. |
Redis_Hyperlog_Monitor | pfadd, pfcount, and pfmerge | Counts/s | The monitoring information about the use of HyperLogLog-related commands, such as the number of times PFADD and PFCOUNT are executed per second. |
Redis_Pub_Sub_Monitor | psubscribe, publish, pubsub, punsubscribe, subscribe, and unsubscribe | Counts/s | The monitoring information about the use of commands related to the Pub/Sub command group, such as the number of times PUBLISH and SUBSCRIBE are executed per second. |
Redis_Transaction_Monitor | discard, exec, multi, unwatch, and watch | Counts/s | The monitoring information about the use of transaction-related commands, such as the number of times WATCH and MULTI are executed per second. |
Redis_Scripting_Monitor | eval, evalsha, and script | Counts/s | The monitoring information about the use of scripting-related commands, such as the number of times EVAL and EVALSHA are executed per second. |
Calls_Monitor | flushall_calls, flushdb_calls, and keys_calls | Counts | The cumulative number of times FLUSHALL, FLUSHDB, and KEYS are executed per second. |
Redis_Connection_Monitor | auth, echo, ping, quit, and select | Counts/s | The monitoring information about the use of connection-related commands, such as the number of times AUTH and ECHO are executed per second. |
Redis_Server_Monitor | bgsave, client, command, config, dbsize, debug, flushall, flushdb, info, monitor, slowlog, and time | Counts/s | The monitoring information about the use of server-related commands, such as the number of times BGSAVE and CONFIG are executed per second. |
Redis_Geo_Monitor | geoadd, geohash, geopos, geodist, georadius, and georadiusbymember | Counts/s | The monitoring information about the use of geo-related commands, such as the number of times GEOADD and GEOHASH are executed per second. |
Redis_Streams_Monitor | xinfo, xadd, xtrim, xdel, xrange, xrevrange, xlen, xread, xgroup, xreadgroup, xack, xclaim, and xpending | Counts/s | The monitoring information about the use of stream-related commands, such as the number of times XINFO and XADD are executed per second. |
Redis_TairDoc_Monitor | jsondel, jsonget, jsonmget, jsonset, jsontype, jsonnumincrby, jsonstrappend, jsonstrlen, jsonarrappend, jsonarrpop, jsonarrinsert, jsonarrlen, and jsonarrtrim | Counts/s | The monitoring information about the use of Doc-related commands, such as the number of times JSON.SET and JSON.GET are executed per second. |
Redis_TairHash_Monitor | exhset, exhsetnx, exhmset, exhexpireat, exhexpire, exhmsetwithopts, exhpexpireat, exhpexpire, exhpttl, exhttl, exhver, exhsetver, exhincrby, exhincrbyfloat, exhget, exhgetwithver, exhmget, exhdel, exhlen, exhexists, exhkeys, exhvals, exhgetall, exhmgetwithver, exhsterlen, and exhscan | Counts/s | The monitoring information about the use of exHash-related commands, such as the number of times EXHSET and EXHMSET are executed per second. |
Redis_TairString_Monitor | cas, cad, exset, exget, exsetver, exincrby, exincrbyfloat, excas, and excad | Counts/s | The monitoring information about the use of exString-related commands, such as the number of times EXSET and EXGET are executed per second. |
Redis_TairGis_Monitor | gisadd, gisget, gisdel, gissearch, giscontains, gisintersects, and gisgetall | Counts/s | The monitoring information about the use of GIS-related commands, such as the number of times GIS.ADD, GIS.GET, and GIS.DEL are executed per second. |
Redis_TairBloom_Monitor | bfadd, bfmadd, bfexists, bfmexists, bfinsert, bfreserve, and bfdebug | Counts/s | The monitoring information about the use of Bloom-related commands, such as the number of times BF.RESERVE and BF.ADD are executed per second. |