You need to enable JavaScript to run this app.
Cache for Redis

Cache for Redis

Copy page
Download PDF
Cache for Redis
Performance whitepaper
Copy page
Download PDF
Performance whitepaper
This topic describes the detailed method and test results of stress testing on Cache for Redis instances using the Memtier-benchmark stress testing tool. You can conduct your own tests and comparisons according to the instructions in this article to quickly understand the performance of the database system.​
Test environment​
  • Both the ECS instance and Cache for Redis instances to be tested are in the same region and availability zone. For this test, it was availability zone A in China(Beijing).​
  • The network types are both Virtual Private Cloud (VPC).​
tip​
Ensure that the ECS instance and Cache for Redis instance are in the same VPC.​
  • Cache for Redis instances used for testing​
  • The database version is Redis 5.0.​
  • The instance type is primary-secondary.​
  • The test object determines the instance specification. Test instances with 16-sharding clusters enabled and instances with 32 sharding clusters enabled respectively. Each shard has 2 GiB of memory.​
  • ECS instances used for testing​
  • Operating system: Debian 10, 64-bit.​
  • During testing, the number of shards enabled in Redis instances varied, and the corresponding ECS configurations also differed:​
  • When testing Redis instances with 16-sharding clusters enabled, the ECS configuration was:​
  • 8 general-purpose ECS instances with 32 vCPUs and 128 GiB memory (specification code ecs.g1.8xlarge).​
  • When testing Redis instances with 32-sharding clusters enabled, the ECS configuration was:​
  • 12 general-purpose ECS instances with 32 vCPUs and 128 GiB memory (specification code ecs.g1.8xlarge).​
Testing tools​
Memtier-benchmark is used in this test. Memtier-benchmark is the command line tool developed by Redis Labs. It can be used for load generation and benchmark testing of non-relational, key-value databases. It is the official benchmark tool provided by Redis.Memtier-benchmark is a command-line tool developed by Redis Labs for load generation and benchmarking of non-relational key-value databases, and is the official benchmarking tool provided by Redis.​
For information on how to download and install Memtier-benchmark tools, refer to Memtier-benchmark.​
Test commands​
The following commands are used for stress testing in this test:​
​
memtier_benchmark -s <server-url> -p 6379 -c 20 -t 10 --ratio=1:1 --select-db=0 --test-time=1800 -d 32 -a <password>​
​
​
Parameters​
Description​
-s​
Connection address of the Redis database.​
-a​
Password for the Redis database.​
-c​
Number of clients simulated to connect per thread during the test.​
-d​
Size of the object data used for testing. Unit: Byte.​
-t​
Number of threads used in the test.​
--ratio​
Read/write ratio of test commands, which is the ratio of SET to GET.​
--test-time​
Test duration. Unit: seconds.​
--select-db​
DB number used for testing.​
​
tip​
In actual stress testing, Redis instances with different specifications use different max connections. When executing the above stress test commands in an actual test, continuously adjust the number of max connections to achieve higher throughput.​
Test results​
​
Single shard memory​
Number of shards​
Total instance memory​
Total concurrent connections​
QPS​
2 GiB​
16​
32 GiB​
3,200​
1,885,000​
2 GiB​
32​
64 GiB​
6,400​
3,371,000​
​
tip​
  • The metric used for the test results is QPS (Query Per Second), which refers to the number of operations executed by the database per second. Unit: ops/second.​
Last updated: 2025.12.17 20:00:42