This topic describes the test environment, test tool, test method, and test results of a performance test on Tair (Enterprise Edition) SSD-based instances.
Test environment
Item | Description |
Region and zone | All tests are performed in Hangzhou Zone I. |
Instance architecture | The standard master-replica architecture is used. For more information, see Standard architecture. |
Virtual machine on which a stress testing tool is deployed | An Elastic Compute Service (ECS) instance of the ecs.g6e.13xlarge instance type is used. For more information, see Overview of instance families. |
SSD-based instance type |
|
The performance test focuses on evaluating the performance of SSD-based instances in the following scenarios:
Scenarios in which the memory size is larger than the data volume: Most data can be accessed from the memory. In these scenarios, the ratio of the memory size to the data volume is approximately 7:1.
Scenarios in which the data volume is larger than the memory size: Only part of the data is cached in the memory. Most access requests require read and write operations on disks. In these scenarios, the ratio of the memory size to the data volume is approximately 1:4.
Test tool
You can use open source YCSB to perform stress tests. YCSB is a Java tool that can be used to benchmark the performance of multiple types of databases. For more information about how to install and use YCSB, see YCSB.
In the test, the YCSB source code is modified to allow you to set the recordcount parameter to a LONG-typed value and test the string-related commands of Redis. To obtain the modified source code, download the YCSB source code package.
Test commands
The following script is used to test performance in scenarios where the data volume is larger than the memory size:
#! /bin/bash
ip=192.168.0.23
port=3100
timeout=30000
command_group=string
recordcount=640000000
run_operationcount=20000000
fieldcount=1
fieldlength=100
threads=32
load_sleep_time=600
run_sleep_time=60
echo "##################################### $command_group ############################################"
#Load
./bin/ycsb load redis -s -P workloads/workloada -p "redis.host=${ip}" -p "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${recordcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -threads ${threads}
sleep ${load_sleep_time}
#Uniform-Read
./bin/ycsb run redis -s -P workloads/workloadc -p "redis.host=${ip}" -p "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=uniform" -threads ${threads}
sleep ${run_sleep_time}
#Zipfian-Read
./bin/ycsb run redis -s -P workloads/workloadc -p "redis.host=${ip}" -p "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=zipfian" -threads ${threads}
sleep ${run_sleep_time}
#Uniform-50%Read-50%Update
./bin/ycsb run redis -s -P workloads/workloada -p "redis.host=${ip}" -p "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=uniform" -threads ${threads}
Table 1. Parameters
Parameter | Description |
ip | The IP address of the Tair instance. |
port | The service port of the Tair instance. |
timeout | The timeout period of the test command. Unit: ms. |
command_group | The type of data to be tested. Set this parameter to String. |
recordcount | The amount of data prepared during the data loading phase. |
run_operationcount | The amount of data involved in the operation. When you set this parameter, take note of the following rules:
|
fieldcount | The number of fields. Set this parameter to 1. |
fieldlength | The length of each field. Set this parameter to 100. |
threads | The number of YCSB threads. Set this parameter based on the instance type. |
Test results
Test metric | Description |
QPS | The number of read and write operations that are processed per second. |
Average Latency | The average latency of read or write operations. Unit: µs. |
99th Percentile Latency | The highest latency for the fastest 99% of operations. Unit: µs. For example, if this parameter is set to 500 µs, 99% of the operations are processed within 500 µs. |
Scenarios in which the memory size is larger than the data volume
Instance type | YCSB configuration | Workload | QPS | Average latency (µs) | 99th percentile latency (µs) |
tair.localssd.c1m4.2xlarge | recordcount=40000000 run_operationcount=40000000 threads=64 | Load | 59830 | 1066 | 2761 |
Uniform-Read | 158221 | 389 | 891 | ||
Zipfian-Read | 164233 | 379 | 873 | ||
Uniform-50%Read-50%Update | 78099 | Read: 651 | Read: 2,012 | ||
Update: 974 | Update: 2,731 | ||||
tair.localssd.c1m4.4xlarge | recordcount=80000000 run_operationcount=80000000 threads=128 | Load | 91991 | 1388 | 3077 |
Uniform-Read | 302940 | 414 | 921 | ||
Zipfian-Read | 305639 | 410 | 899 | ||
Uniform-50%Read-50%Update | 124929 | Read: 798 | Read: 2,231 | ||
Update: 1,234 | Update: 3,013 | ||||
tair.localssd.c1m4.8xlarge | recordcount=160000000 run_operationcount=160000000 threads=256 | Load | 132865 | 1924 | 3323 |
Uniform-Read | 489287 | 513 | 1313 | ||
Zipfian-Read | 501847 | 499 | 1272 | ||
Uniform-50%Read-50%Update | 187390 | Read: 1,069 | Read: 2,749 | ||
Update: 1,644 | Update: 3,613 |
Scenarios in which the data volume is larger than the memory size
Instance type | YCSB configuration | Workload | QPS | Average latency (µs) | 99th percentile latency (µs) |
tair.localssd.c1m4.2xlarge | recordcount=1280000000 run_operationcount=1280000000 threads=64 | Load | 50396 | 1258 | 4463 |
Uniform-Read | 74611 | 842 | 1745 | ||
Zipfian-Read | 106366 | 588 | 1406 | ||
Uniform-50%Read-50%Update | 47833 | Read: 1,232 | Read: 4,049 | ||
Write: 1,402 | Write: 4,583 | ||||
tair.localssd.c1m4.4xlarge | recordcount=2560000000 run_operationcount=2560000000 threads=128 | Load | 81097 | 1573 | 4119 |
Uniform-Read | 118141 | 1071 | 3085 | ||
Zipfian-Read | 194704 | 634 | 1595 | ||
Uniform-50%Read-50%Update | 75625 | Read: 1,562 | Read: 4,999 | ||
Update: 1,795 | Update: 5,419 | ||||
tair.localssd.c1m4.8xlarge | recordcount=5120000000 run_operationcount=5120000000 threads=256 | Load | 115660 | 2210 | 5235 |
Uniform-Read | 202365 | 1252 | 3985 | ||
Zipfian-Read | 309019 | 804 | 2551 | ||
Uniform-50%Read-50%Update | 122318 | Read: 1,861 | Read: 5,603 | ||
Update: 2,307 | Update: 6,415 |