All Products
Search
Document Center

ApsaraDB for Redis:View performance monitoring data

Last Updated:Sep 06, 2023

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

  1. 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.

  2. In the left-side navigation pane, click Performance Monitor.

  3. 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 All 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 Data Node 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 All tab and view the monitoring metrics on the Proxy Node tab.

    Note
    • You 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 into 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

Operation

Description

DescribeHistoryMonitorValues

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-purpose monitoring metrics and command-related monitoring metrics.

General-purpose monitoring metrics

In this example, the CpuUsage metric is used to describe how to use a general-purpose 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

RedisCpuUsage

RedisCpuUsage

%

The CPU utilization. Valid values: 0 to 100. The metric varies based on the instance series. This is because different instance series use engines that come with different threading models.

  • Tair DRAM-based and persistent memory-optimized instances that are compatible with Redis 6.0: RedisCpuUsage

  • ApsaraDB for Redis Community Edition instances and other Tair instances: CpuUsage

  • Database

  • Database aggregation

  • Proxy node

  • Proxy node aggregation

CpuUsage

CpuUsage

%

MemoryUsage

memoryUsage

%

The memory usage.

  • Database

  • Database aggregation

quotaMemory

quotaMemory

Bytes

The total memory of the data shard.

  • Database

  • Database aggregation

UsedMemory

UsedMemory

Bytes

The amount of used memory, which includes the memory consumed by data and cache.

  • Database

  • Database aggregation

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.

  • Database

  • Database aggregation

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.

  • Database

  • Database aggregation

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.

  • Database

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

N/A

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 mechanism of Tair for maintaining datasets, including the output buffers, query buffers, and AOF files for all clients.

used_memory_dataset

Bytes

The amount of memory used by data.

UsedQPS

TotalQps

N/A

The total number of requests per second, which includes both read and write requests.

  • Database

  • Database aggregation

  • Proxy node

  • Proxy node aggregation

GetQps

N/A

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

N/A

OtherOps

N/A

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.

  • Database

  • Database aggregation

UsedConnection

ConnCount

N/A

The number of used connections.

QPSUsage

qpsUsage

%

The queries per second (QPS) usage.

  • Database

IntranetIn

InFlow

KB/s

The inbound and outbound traffic rates.

  • Database

  • Database aggregation

  • Proxy node

  • Proxy node aggregation

IntranetOut

OutFlow

KB/s

IntranetInRatio

intranetInRatio

%

The inbound and outbound traffic usage.

  • Database

  • Database aggregation

IntranetOutRatio

intranetOutRatio

%

Redis_Avg_Rt_Monitor

AvgRt

μs

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 request to the time when the data node returns a response.

  • Database

  • Database aggregation

  • Proxy node

  • Proxy node aggregation

Redis_Max_Rt_Monitor

MaxRt

μs

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

N/A

The total number of keys, which indicates the number of primary keys stored in the instance.

  • Database

  • Database aggregation

Expires

N/A

The number of keys that has a time to live (TTL) value configured. This submetric displays the instantaneous value when data is collected.

ExpiredKeys

N/A

The cumulative number of expired keys.

EvictedKeys

N/A

The cumulative number of evicted keys.

ExpiredKeysPerSecond

N/A

The number of keys that are expired per second.

EvictedKeysPerSecond

N/A

The number of keys that are evicted per second.

inmem_keys

N/A

These submetics are available only for hybrid-storage instances (phased out), and you can ignore these submetrics.

swapped_keys

N/A

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).

  • Database

  • Database aggregation

hit

N/A

The number of key hits per second.

miss

N/A

The number of key misses per second.

evicted_keys_per_sec

N/A

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.

  • Database

RocksDBConn

Tair_Connection_Monitor

Bytes

Tair_Connection_Monitor

Bytes

Tair_Disk_Monitor

io_bandwidth_kbps, iops, iops_usage, and other submetics

%, ms, and other units

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.

  • Proxy node

  • Proxy node aggregation

UsedConnection

N/A

The number of used connections.

NewUserConnQps

N/A

The number of connections that are established per second from clients to proxy nodes.

Redis_Package_Monitor

request

Bytes

The average bytes of a single request.

  • Proxy node

response

Bytes

The average bytes of a single response.

request_max

Bytes

The maximum bytes of a single request.

response_max

Bytes

The maximum bytes of a single response.

RedisProxyConn

RedisUsedConnection

N/A

The number of connections that are established from proxy nodes to data nodes.

NewDBConnQps

N/A

The number of connections that are established per second from proxy nodes to data nodes.

DisconnectDBConn

N/A

The cumulative number of disconnections from proxy nodes to data nodes.

DisconnectUserConn

N/A

The cumulative number of disconnections from clients to proxy nodes.

TotalCalls

TotalRefusedCommands

N/A

The cumulative number of rejected commands.

TotalCallsPerSecCalls

N/A

The QPS.

TotalCallsPerSecRetryCalls

N/A

The number of request retries per second.

TotalCallsPerSecRetryFailed

N/A

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.

Note

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

The cumulative number of times FLUSHALL, FLUSHDB, and KEYS are executed per second.

Redis_Connection_Monitor

auth, echo, ping, quit, and select

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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

N/A

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.