This topic describes the tests on ApsaraDB for Redis Enhanced Edition (Tair) DRAM-based instances that are compatible with Redis 5.0. It also provides the test environment, tool, methods, and 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 item | Description |
---|---|
Region and zone | All tests are performed in Beijing Zone G. |
Instance architecture | The test instance uses the standard master-replica architecture. For more information, see Standard architecture. |
Virtual machine to deploy tools for pressure tests | An 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 type | Test 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
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
Parameter | Description |
---|---|
-h | The internal endpoint of the Tair instance. For more information, see View endpoints and port numbers. |
-p | The service port number that is used to connect to the Tair instance. Default value: 6379. |
-a | The 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. |
-c | The number of concurrent connections. |
-n | The total number of requests tested. Set this parameter to a large value to enable continuous stress testing. |
-t | The command used in testing, such as GET or SET. |
-d | The value that you process by using a SET or GET command. Unit: bytes. |
-r | The random range of the used keys. It specifies the number of keys to be used. |
--threads | Runs a multi-threaded stress test and specifies the number of threads. |
Test results
Test metric | Description |
---|---|
QPS | The number of read and write operations that are processed per second. |
Latency | The 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 length | QPS | Latency (ms) |
---|---|---|
64 bytes | 444,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 bytes | 435,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 bytes | 427,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 bytes | 428,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 length | QPS | Latency (ms) |
---|---|---|
64 bytes | 218,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 bytes | 206,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 bytes | 203,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 bytes | 184,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 |