This topic describes the tests on Tair persistent memory-optimized instances. The test environment, tool, methods, and results are introduced.
Overview
Tair persistent memory-optimized instances adopt Persistent Memory (PMEM) to provide large-capacity in-memory databases that are compatible with open source Redis. Persistent memory-optimized instances do not use disks to implement data persistence and cost 30% less than ApsaraDB for Redis Community Edition instances while delivering almost identical throughput and latency and maintaining the persistence of each operation. This helps improve the reliability of business data. For more information, see Persistent memory-optimized instances.
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.
Open source YCSB tests only hashes. To use YCSB to test strings, you must use the RedisClient.java file to replace the original file that has the same name in the YCSB/redis/src/main/java/site/ycsb/db directory after you download YCSB.
Workloads
The total amount of data involved in the test is 8 GB. The data distribution method is Zipfian. The performance of persistent memory-optimized instances was tested in the following scenarios:
- Data loading: 100% write operations.
- Workload C: 100% read operations.
- Workload A: 50% update operations and 50% read operations.
For more information about workloads, see Core Workloads.
Note The complex commands for sets and Zsets cannot be tested in this test due to their applicable scenarios. You can customize a test for sets and Zsets based on your business scenario.
Test commands
# Load data.
workload=a
./bin/ycsb load redis -s -P workloads/workload${workload} -p "redis.host=${server_ip}" -p "redis.port=${port}" -p "redis.password=${password}" -p "recordcount=${recordcount}" -p "operationcount=${operationcount}" -p "redis.timeout=30000" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -threads ${threads} -p "redis.password=***:*****"
# Run Workload C.
workload=c
./bin/ycsb run redis -s -P workloads/workload${workload} -p "redis.host=${server_ip}" -p "redis.port=${port}" -p "redis.password=${password}" -p "recordcount=${recordcount}" -p "operationcount=${operationcount}" -p "redis.timeout=30000" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -threads ${threads} -p "redis.password=***:*****"
# Run Workload A.
workload=a
./bin/ycsb run redis -s -P workloads/workload${workload} -p "redis.host=${server_ip}" -p "redis.port=${port}" -p "redis.password=${password}" -p "recordcount=${recordcount}" -p "operationcount=${operationcount}" -p "redis.timeout=30000" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -threads ${threads} -p "redis.password=***:*****"
Table 1. ParametersParameter | Description |
---|
server_ip | The IP address used to connect to the Tair instance. |
port | The service port used to connect to the Tair instance. |
password | The password format varies based on the selected account: - If you use the default account whose username is the same as the instance ID, enter the password. For example, if the username of the default account is
r-bp1zxszhcgatnx**** and the password is Password21 , the command to verify the password is AUTH Password21 . - If you use a custom account, enter the password in the
user:password format. For example, if the username of the custom account is testaccount and the password is Rp829dlwa , the command to verify the password is AUTH testaccount:Rp829dlwa .
|
recordcount | The amount of prepared data. |
operationcount | The amount of data involved in the operation. |
command_group | The type of data that you want to test. In this test, the following types of data are tested in sequence: |
fieldcount | The number of fields or elements. To test strings, set this parameter to 1. To test other types of data, set this parameter to 10. |
fieldlength | The length of a value. Set this parameter based on the test requirements. |
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. |
INSERT Average Latency | The average latency of write operations. Unit: µs. |
INSERT 99th Percentile Latency | The highest latency for the fastest 99% of write operations. Unit: µs. For example, if this parameter is set to 500 µs, 99% of the operations are processed within 500 µs. |
READ AverageLatency | The average latency of read operations. Unit: µs. |
READ 99thPercentileLatency | The highest latency for the fastest 99% of read operations. Unit: µs. |
UPDATE AverageLatency | The average latency of update operations. Unit: µs. |
UPDATE 99thPercentileLatency | The highest latency for the fastest 99% of update operations. Unit: µs. |
Test results for data loading
Table 2. StringsValue length (byte) | QPS | INSERT Average Latency (µs) | INSERT 99th Percentile Latency (µs) |
---|
128 | 134,478 | 473 | 687 |
256 | 126,139 | 504 | 828 |
1,024 | 99,775 | 638 | 1,051 |
2,048 | 77,130 | 826 | 1,157 |
4,096 | 60,646 | 1,050 | 1,534 |
Table 3. HashesNumber of fields in a key | Value length (byte) | QPS | INSERT Average Latency (µs) | INSERT 99th Percentile Latency (µs) |
---|
10 | 128 | 47,353 | 1,348 | 1,885 |
256 | 46,716 | 1,366 | 2,181 |
1,024 | 27,759 | 2,297 | 2,873 |
2,048 | 16,605 | 3,833 | 4,923 |
Table 4. ListsNumber of elements in a key | Value length (byte) | QPS | INSERT Average Latency (µs) | INSERT 99th Percentile Latency (µs) |
---|
10 | 128 | 64,950 | 979 | 1,310 |
256 | 47,157 | 1,348 | 1,752 |
1,024 | 26,719 | 2,386 | 3,457 |
2,048 | 16,714 | 3,811 | 4,751 |
4,096 | 10,129 | 6,279 | 7,891 |
Table 5. SetsNumber of members in a key | Value length (byte) | QPS | INSERT Average Latency (µs) | INSERT 99th Percentile Latency (µs) |
---|
10 | 128 | 63,670 | 1,001 | 1,514 |
256 | 44,707 | 1,427 | 2,129 |
1,024 | 25,375 | 2,513 | 3,239 |
2,048 | 14,318 | 4,451 | 5,619 |
4,096 | 8,378 | 7,608 | 9,095 |
Table 6. Sorted setsNumber of elements in a key | Value length (byte) | QPS | INSERT Average Latency (µs) | INSERT 99th Percentile Latency (µs) |
---|
10 | 128 | 40,292 | 1,585 | 2,469 |
256 | 34,168 | 1,869 | 2,569 |
1,024 | 21,347 | 2,989 | 3,905 |
2,048 | 12,868 | 4,956 | 6,255 |
4,096 | 7,864 | 8,101 | 9,599 |
Test results for Workload C
Table 7. StringsValue length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) |
---|
128 | 170,699 | 362 | 546 |
256 | 163,829 | 380 | 565 |
1,024 | 161,491 | 386 | 569 |
2,048 | 130,189 | 487 | 729 |
4,096 | 115,433 | 548 | 808 |
Table 8. HashesNumber of fields in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) |
---|
10 | 128 | 96,111 | 662 | 874 |
256 | 86,892 | 733 | 915 |
1,024 | 61,608 | 1,030 | 1,293 |
2,048 | 37,334 | 1,696 | 2,331 |
4,096 | 25,943 | 2,429 | 3,319 |
Table 9. ListsNumber of elements in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) |
---|
10 | 128 | 105,296 | 604 | 889 |
256 | 97,047 | 655 | 890 |
1,024 | 66,384 | 955 | 1,192 |
2,048 | 35,796 | 1,769 | 2,461 |
4,096 | 26,314 | 2,392 | 3,271 |
Table 10. SetsNumber of members in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) |
---|
10 | 128 | 97,825 | 651 | 896 |
256 | 80,954 | 787 | 970 |
1,024 | 59,924 | 1,060 | 1,313 |
2,048 | 33,356 | 1,900 | 2,637 |
4,096 | 23,605 | 2,677 | 3,723 |
Table 11. Sorted setsNumber of elements in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) |
---|
10 | 128 | 58,380 | 1,093 | 1,341 |
256 | 56,287 | 1,133 | 1,390 |
1,024 | 47,468 | 1,338 | 1,688 |
2,048 | 30,073 | 2,096 | 2,783 |
4,096 | 21,850 | 2,880 | 3,765 |
Test results for Workload A
Table 12. StringsValue length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) | UPDATE Average Latency (µs) | UPDATE 99th Percentile Latency (µs) |
---|
128 | 141,120 | 451 | 616 | 450 | 618 |
256 | 137,551 | 463 | 617 | 461 | 618 |
1,024 | 124,165 | 516 | 724 | 508 | 725 |
2,048 | 92,652 | 695 | 881 | 678 | 871 |
4,096 | 78,994 | 819 | 1,042 | 791 | 1,024 |
Table 13. HashesNumber of fields in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) | UPDATE Average Latency (µs) | UPDATE 99th Percentile Latency (µs) |
---|
10 | 128 | 99,495 | 646 | 831 | 633 | 820 |
256 | 88,235 | 731 | 985 | 712 | 966 |
1,024 | 72,013 | 892 | 1,159 | 863 | 2,049 |
2,048 | 45,790 | 1,379 | 1,898 | 1,354 | 2,821 |
4,096 | 32,912 | 1,891 | 2,931 | 1,915 | 7,887 |
Table 14. ListsNumber of elements in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) | UPDATE Average Latency (µs) | UPDATE 99th Percentile Latency (µs) |
---|
10 | 128 | 71,696 | 591 | 775 | 1,185 | 1,383 |
256 | 66,294 | 638 | 800 | 1,281 | 1,456 |
1,024 | 53,402 | 791 | 1,006 | 1,581 | 1,865 |
2,048 | 36,519 | 1,221 | 1,581 | 2,232 | 2,831 |
4,096 | 28,390 | 1,618 | 2,113 | 2,803 | 3,777 |
Table 15. SetsNumber of members in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) | UPDATE Average Latency (µs) | UPDATE 99th Percentile Latency (µs) |
---|
10 | 128 | 66,346 | 640 | 792 | 1,282 | 1,445 |
256 | 60,010 | 707 | 993 | 1,415 | 1,957 |
1,024 | 45,359 | 933 | 1,128 | 1,858 | 2,073 |
2,048 | 29,027 | 1,529 | 2,021 | 2,820 | 4,507 |
4,096 | 21,440 | 2,144 | 2,773 | 3,726 | 5,095 |
Table 16. Sorted setsNumber of elements in a key | Value length (byte) | QPS | READ Average Latency (µs) | READ 99th Percentile Latency (µs) | UPDATE Average Latency (µs) | UPDATE 99th Percentile Latency (µs) |
---|
10 | 128 | 49,695 | 861 | 1,050 | 1,707 | 1,912 |
256 | 48,036 | 891 | 1,084 | 1,763 | 1,970 |
1,024 | 39,795 | 1,081 | 1,386 | 2,107 | 2,563 |
2,048 | 28,415 | 1,597 | 1,981 | 2,855 | 3,589 |
4,096 | 21,317 | 2,247 | 2,821 | 3,665 | 4,787 |