This topic describes how to test performance-enhanced instances of ApsaraDB for Redis Enhanced Edition (Tair).

Test command

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

  • 16 threads, 256 connections, and 100,000 keys are specified to test the SET command execution performance.
    ./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
  • 16 threads, 256 connections, and 100,000 keys are specified to test the GET command execution performance.
    ./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
Parameter Description
-h The internal endpoint of the instance. For more information, see View endpoints.
-p The service port of the ApsaraDB for Redis instance. Default value: 6379.
-a The password of the ApsaraDB for Redis instance.
Note If you use an account created in the ApsaraDB for Redis console to connect to the ApsaraDB for Redis instance, the format of the connection string must be <user>:<password>. For example, if the username of the account is admin and the password is Rp829dlwa, you can use admin:Rp829dlwa to log on to the 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 tested commands, such as GET and SET.
-d The value that you process by using the SET or GET command. Unit: bytes.
-r The random range of the used keys. It specifies the number of keys to be used.
--threads Start a multi-threaded stress test and specify the number of threads.
Note For more information about the parameters, see redis-benchmark.