This topic describes the method, environment, and tool that are used to test the performance of a Redis 5.0-compatible Tair DRAM-based instance and provides the test results.

Overview

Tair DRAM-based instances are suitable for scenarios that involve high concurrency and a large number of read and write operations. DRAM-based instances provide more benefits than ApsaraDB for Redis Community Edition instances.

  • DRAM-based instances use the multi-threading model. A DRAM-based instance provides the read and write performance approximately three times that of an ApsaraDB for Redis Community Edition instance with the same specifications.
  • DRAM-based instances provide multiple enhanced data modules, including TairString (including CAS and CAD commands), TairHash, TairGIS, TairBloom, TairDoc, TairTS, TairCpc, TairZset, TairRoaring, TairVector, and TairSearch. These modules eliminate your worries about data structures and timeliness for storage and allow you to focus on application development.

For more information, see DRAM-based instances.

Test environment

Environment itemDescription
Region and zoneAll tests are performed in Beijing Zone G.
Instance architectureThe test instance uses the standard master-replica architecture. For more information, see Standard architecture.
Virtual machine to deploy tools for pressure testsAn Elastic Compute Service (ECS) instance of the ecs.g5ne.16xlarge instance type is used. For more information, see Overview of instance families and What is ECS?
Instance typeTest results are less affected by the instance type. The test instance uses the redis.amber.master.large.multithread instance type. For more information, see DRAM standard instances.

Test tool

The redis-benchmark utility is used. It is the official test tool of open source Redis that is used to benchmark the performance of Redis services. For more information, see Redis benchmark.
Note In this test, the redis-benchmark 6.0 version is used. To ensure that the --threads parameter is supported for redis-benchmark, use an instance that is compatible with Redis 6.0 or later. For more information, visit GitHub.

Test methods

In this test, redis-benchmark is used to perform stress testing in the following two settings:

  • SET commands are run on the test instance that has a maximum of 16 threads, 256 connections, and 100,000 keys.
    ./redis-benchmark -h r-bp1s02ae14mr****.redis.rds.aliyuncs.com -p 6379 -a testaccount:Rp829dlwa -n 3000000 -r 100000  -c 256 -t set -d 64 --threads 16
  • GET commands are run on the test instance that has a maximum of 16 threads, 256 connections, and 100,000 keys.
    ./redis-benchmark -h r-bp1s02ae14mr****.redis.rds.aliyuncs.com -p 6379 -a testaccount:Rp829dlwa -n 3000000 -r 100000 -c 256 -t get -d 64 --threads 16
Table 1. Parameters
ParameterDescription
-hThe internal endpoint of the Tair instance. For more information, see View endpoints and port numbers.
-pThe service port number that is used to connect to the Tair instance. Default value: 6379.
-aThe password of the account that is used to connect to the Tair instance.
Note If you are using an account that is created in the Tair console to connect to the instance, the password must be in the <user>:<password> format. For example, if the username of the account is admin and the password is Rp829dlwa, use admin:Rp829dlwa as the password to connect to the Tair instance.
-cThe number of concurrent connections.
-nThe total number of requests tested. Set this parameter to a large value to enable continuous stress testing.
-tThe command used in testing, such as GET or SET.
-dThe value that you process by using a SET or GET command. Unit: bytes.
-rThe random range of the used keys. It specifies the number of keys to be used.
--threadsRuns a multi-threaded stress test and specifies the number of threads.
Note For more information about the parameters, see Redis benchmark.

Test results

Test metricDescription
QPSThe number of read and write operations that are processed per second.
LatencyThe average latency for a specified proportion of operations. Unit: milliseconds. For example, 70.33% <= 0.6 milliseconds specifies that 70.33% of the operations are processed within 0.6 milliseconds.

Test results for the GET command

Value lengthQPSLatency (ms)
64 bytes444,115.47

0.00% <= 0.1 milliseconds

0.01% <= 0.2 milliseconds

0.05% <= 0.3 milliseconds

3.10% <= 0.4 milliseconds

31.02% <= 0.5 milliseconds

70.33% <= 0.6 milliseconds

99.67% <= 0.7 milliseconds

128 bytes435,276.94

0.00% <= 0.1 milliseconds

0.01% <= 0.2 milliseconds

0.04% <= 0.3 milliseconds

0.67% <= 0.4 milliseconds

18.28% <= 0.5 milliseconds

57.34% <= 0.6 milliseconds

86.72% <= 0.7 milliseconds

98.58% <= 0.8 milliseconds

99.88% <= 0.9 milliseconds

256 bytes427,960.03

0.00% <= 0.1 milliseconds

0.02% <= 0.2 milliseconds

0.04% <= 0.3 milliseconds

1.38% <= 0.4 milliseconds

24.10% <= 0.5 milliseconds

62.43% <= 0.6 milliseconds

86.83% <= 0.7 milliseconds

98.13% <= 0.8 milliseconds

99.86% <= 0.9 milliseconds

1,024 bytes428,265.53

0.00% <= 0.1 milliseconds

0.02% <= 0.2 milliseconds

0.06% <= 0.3 milliseconds

3.92% <= 0.4 milliseconds

27.29% <= 0.5 milliseconds

62.92% <= 0.6 milliseconds

85.32% <= 0.7 milliseconds

96.47% <= 0.8 milliseconds

99.52% <= 0.9 milliseconds

Test results for the SET command

Value lengthQPSLatency (ms)
64 bytes218,086.66

0.00% <= 0.1 milliseconds

0.00% <= 0.2 milliseconds

0.01% <= 0.3 milliseconds

0.01% <= 0.4 milliseconds

0.02% <= 0.5 milliseconds

0.04% <= 0.6 milliseconds

0.07% <= 0.7 milliseconds

0.09% <= 0.8 milliseconds

0.13% <= 0.9 milliseconds

0.49% <= 1.0 milliseconds

16.20% <= 1.1 milliseconds

81.83% <= 1.2 milliseconds

98.74% <= 1.3 milliseconds

99.74% <= 1.4 milliseconds

128 bytes206,825.23

0.00% <= 0.1 milliseconds

0.00% <= 0.2 milliseconds

0.00% <= 0.3 milliseconds

0.01% <= 0.4 milliseconds

0.01% <= 0.5 milliseconds

0.03% <= 0.6 milliseconds

0.05% <= 0.7 milliseconds

0.08% <= 0.8 milliseconds

0.14% <= 0.9 milliseconds

0.20% <= 1.0 milliseconds

1.08% <= 1.1 milliseconds

36.09% <= 1.2 milliseconds

93.36% <= 1.3 milliseconds

99.17% <= 1.4 milliseconds

256 bytes203,086.92

0.00% <= 0.1 milliseconds

0.00% <= 0.2 milliseconds

0.00% <= 0.3 milliseconds

0.01% <= 0.4 milliseconds

0.01% <= 0.5 milliseconds

0.02% <= 0.6 milliseconds

0.04% <= 0.7 milliseconds

0.05% <= 0.8 milliseconds

0.08% <= 0.9 milliseconds

0.13% <= 1.0 milliseconds

1.01% <= 1.1 milliseconds

26.12% <= 1.2 milliseconds

91.45% <= 1.3 milliseconds

99.16% <= 1.4 milliseconds

1,024 bytes184,547.23

0.00% <= 0.1 milliseconds

0.00% <= 0.2 milliseconds

0.00% <= 0.3 milliseconds

0.00% <= 0.4 milliseconds

0.01% <= 0.5 milliseconds

0.02% <= 0.6 milliseconds

0.03% <= 0.7 milliseconds

0.05% <= 0.8 milliseconds

0.07% <= 0.9 milliseconds

0.09% <= 1.0 milliseconds

0.12% <= 1.1 milliseconds

0.30% <= 1.2 milliseconds

11.28% <= 1.3 milliseconds

75.67% <= 1.4 milliseconds

97.70% <= 1.5 milliseconds

99.41% <= 1.6 milliseconds