This topic describes the Orca performance test results of PolarDB for MySQL Enterprise Edition 8.0.2.
Test environment
The ECS instance and PolarDB for MySQL cluster are deployed in the same region and virtual private cloud (VPC).
PolarDB for MySQL cluster configurations:
Cluster specifications:
Edition: Cluster Edition
Database engine: MySQL 8.0.2
Node specifications:
polar.mysql.x4.2xlarge(16 cores, 64 GB of memory)Storage type: PSL5
Parameter configuration: Blink-tree index acceleration is enabled (
loose_innodb_polar_blink_tree=ON) to improve query performance.
ECS instance configurations:
Instance type:
ecs.c8i.16xlarge(64 cores, 128 GB of memory)Connection method: The ECS instance connects to the PolarDB cluster by using the Orca private endpoint, which ensures high-performance, secure, and low-latency data transmission within the VPC.
Test tools
The test uses the multi-threaded benchmarking tool memtier benchmark from Redis Labs.
Performance testing
Test scenarios
We tested the performance of the Orca feature under scenarios that involve 128 and 512 concurrent connections, respectively. For each scenario, we evaluated the performance by using two networking mechanisms: Ping-Pong and Pipeline.
Concurrency | Value size | Threads | Connections per thread | Total connections | Operations per connection | Key range | Total data volume |
128 | 128 bytes | 32 | 4 | 128 | 2,000,000 | [1, 128,000,000] | Approximately 30 GB |
4,096 bytes | 32 | 4 | 128 | 200,000 | [1, 12,800,000] | Approximately 60 GB | |
16 KB | 32 | 4 | 128 | 200,000 | [1, 12,800,000] | Approximately 750 GB | |
512 | 128 bytes | 32 | 16 | 512 | 2,000,000 | [1, 512,000,000] | Approximately 150 GB |
4,096 bytes | 32 | 16 | 512 | 200,000 | [1, 51,200,000] | Approximately 250 GB | |
16 KB | 32 | 16 | 512 | 200,000 | [1, 51,200,000] | Approximately 1.5 TB |
The following table describes the parameters:
Parameter | Description |
Concurrency | The total number of concurrent connections. Concurrencies tested: 128 and 512. |
Value size | The data size associated with each key in a key-value pair. Value sizes tested: 128 bytes, 4096 bytes, and 16 KB. |
Threads | The number of threads. 32 threads are used in all test scenarios. |
Connections per thread | The number of client connections created by each thread.
|
Total connections | The total number of concurrent connections. Formula: Total connections = Threads × Connections per thread. |
Operations per connection | The number of read/write operations per connection. |
Key range | The range of keys used for read/write operations. |
Total data volume | The total data volume calculated based on the value size, number of operations, and number of connections. |
Test metrics
Metric | Description |
QPS | The number of read/write operations executed per second, measured in operations per second. Note QPS is a key metric for measuring the system's throughput. A higher value indicates a greater processing capability of the system. |
Avg Latency | The average latency of read and write operations, measured in milliseconds (ms). Note Avg Latency reflects the system's average response speed. A lower value indicates a better user experience. |
p99 Latency | The maximum latency below which 99% of all operations fall, measured in milliseconds (ms). Note p99 Latency is a key metric for measuring the system's performance stability. A lower value indicates more stable system performance under high load. |
Test results
128 concurrency
You may encounter the following authentication errors during testing:
"error: authentication failed [-ERR wrong number of arguments for 'auth'/'hello' command.]"
"error: authentication failed [-WRONGPASS invalid username-password pair or user is disabled.]"
To resolve the issue, perform the following steps:
Update the "-a $password" parameter to the "-a username:password" format, as specified in the official memtier_benchmark documentation. Replace the username and password placeholder with your acutal username and password.
128-byte value size
Perform a Ping-Pong write-only test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 128 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=128000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
4096-byte value size
Perform a Ping-Pong write-only test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 128 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
16 KB value size
Perform a Ping-Pong write-only test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 128 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 4 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=12800000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
Performance comparison
Test scenario | QPS | Avg Latency | p99 Latency |
Ping-Pong write-only test (128 concurrent connections, 128-byte value size) | 87218.00 | 1.47 | 4.95 |
Ping-Pong read-only test (128 concurrent connections, 128-byte value size) | 293096.26 | 0.44 | 2.17 |
Ping-Pong read-write test (128 concurrent connections, 128-byte value size) | 165345.18 | 0.76 | 3.31 |
Pipeline write-only test (128 concurrent connections, 128-byte value size) | 286222.75 | 14.30 | 81.40 |
Pipeline read-only test (128 concurrent connections, 128-byte value size) | 1092862.33 | 3.77 | 32.63 |
Pipeline read-write test (128 concurrent connections, 128-byte value size) | 237017.79 | 17.26 | 65.27 |
Ping-Pong write-only test (128 concurrent connections, 4096-byte value size) | 38831.60 | 3.29 | 41.47 |
Ping-Pong read-only test (128 concurrent connections, 4096-byte value size) | 220300.66 | 0.59 | 3.16 |
Ping-Pong read-write test (128 concurrent connections, 4096-byte value size) | 98865.79 | 1.29 | 11.07 |
Pipeline write-only test (128 concurrent connections, 4096-byte value size) | 59170.52 | 69.74 | 444.41 |
Pipeline read-only test (128 concurrent connections, 4096-byte value size) | 687123.90 | 6.74 | 15.35 |
Pipeline read-write test (128 concurrent connections, 4096-byte value size) | 107992.27 | 38.90 | 155.64 |
Ping-Pong write-only test (128 concurrent connections, 16-KB value size) | 9026.06 | 14.05 | 113.66 |
Ping-Pong read-only test (128 concurrent connections, 16-KB value size) | 146768.22 | 0.89 | 2.51 |
Ping-Pong read-write test (128 concurrent connections, 16-KB value size) | 18204.85 | 7.09 | 96.25 |
Pipeline write-only test (128 concurrent connections, 16-KB value size) | 8937.17 | 456.24 | 2326.52 |
Pipeline read-only test (128 concurrent connections, 16-KB value size) | 160084.54 | 25.69 | 43.77 |
Pipeline read-write test (128 concurrent connections, 16-KB value size) | 18893.23 | 216.60 | 374.78 |
512 concurrency
You may encounter the following authentication errors during testing:
"error: authentication failed [-ERR wrong number of arguments for 'auth'/'hello' command.]"
"error: authentication failed [-WRONGPASS invalid username-password pair or user is disabled.]"
To resolve the issue, perform the following steps:
Update the "-a $password" parameter to the "-a username:password" format, as specified in the official memtier_benchmark documentation. Replace the username and password placeholder with your acutal username and password.
128-byte value size
Perform a Ping-Pong write-only test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 512 concurrent connections and using the 128-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 2000000 --random-data --randomize --distinct-client-seed -d 128 --key-maximum=512000000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
4096-byte value size
Perform a Ping-Pong write-only test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 512 concurrent connections and using the 4096-byte value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 4096 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
16 KB value size
Perform a Ping-Pong write-only test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Ping-Pong read-only test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Ping-Pong read-write test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1Perform a Pipeline write-only test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:0Perform a Pipeline read-only test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=0:1Perform a Pipeline read-write test by simulating 512 concurrent connections and using the 16 KB value size.
memtier_benchmark -s $host -p $port -a $password -c 16 -t 32 --pipeline=32 -n 200000 --random-data --randomize --distinct-client-seed -d 16384 --key-maximum=51200000 --key-minimum=1 --key-prefix= --key-pattern=R:R --ratio=1:1
Performance comparison:
Test scenario | QPS | Avg Latency | p99 Latency |
Ping-Pong write-only test (512 concurrent connections, 128-byte value size) | 85772.17 | 5.96 | 61.18 |
Ping-Pong read-only test (512 concurrent connections, 128-byte value size) | 316719.94 | 1.61 | 5.56 |
Ping-Pong read-write test (512 concurrent connections, 128-byte value size) | 190028.75 | 2.69 | 15.35 |
Pipeline write-only test (512 concurrent connections, 128-byte value size) | 116429.98 | 140.53 | 2818.04 |
Pipeline read-only test (512 concurrent connections, 128-byte value size) | 356837.30 | 45.58 | 158.71 |
Pipeline read-write test (512 concurrent connections, 128-byte value size) | 190782.69 | 85.87 | 3031.03 |
Ping-Pong write-only test (512 concurrent connections, 4096-byte value size) | 31389.90 | 16.25 | 175.10 |
Ping-Pong read-only test (512 concurrent connections, 4096-byte value size) | 277324.08 | 1.85 | 8.25 |
Ping-Pong read-write test (512 concurrent connections, 4096-byte value size) | 70921.68 | 7.22 | 98.81 |
Pipeline write-only test (512 concurrent connections, 4096-byte value size) | 43403.49 | 394.12 | 2916.35 |
Pipeline read-only test (512 concurrent connections, 4096-byte value size) | 393194.35 | 43.03 | 78.33 |
Pipeline read-write test (512 concurrent connections, 4096-byte value size) | 72161.66 | 58.01 | 811.00 |
Ping-Pong write-only test (512 concurrent connections, 16 KB value size) | 9243.16 | 55.36 | 197.63 |
Ping-Pong read-only test (512 concurrent connections, 16 KB value size) | 176990.15 | 2.90 | 16.19 |
Ping-Pong read-write test (512 concurrent connections, 16 KB value size) | 18862.27 | 27.13 | 172.03 |
Pipeline write-only test (512 concurrent connections, 16 KB value size) | 9800.11 | 1701.05 | 24248.31 |
Pipeline read test (512 concurrent connections, 16 KB value size) | 180390.39 | 91.59 | 157.69 |
Pipeline read-write test (512 concurrent connections, 16 KB value size) | 20324.56 | 843.81 | 1392.63 |
Conclusion
PolarDB Orca uses the same distributed storage architecture and three-replica redundancy mechanism as PolarDB for MySQL to ensure no data loss.
In Pipeline scenarios, PolarDB Orca significantly improves system throughput performance by performing extensive aggregation optimization operations. Select the Pipeline mode based on your business requirements.