测试环境:

PolarDB-X 标准版:16C64G(1台)

RDS MySQL5.7: 16C64G(4台)

ECS 压测机: 8C16G(1台)

sysbench 0.5

通过前期的测试,PolarDB+RDS测试中 PolarDB-X+RDS x4性能最好,接下来进行两轮测试,直连RDS和 PolarDB-X+RDS x4两种环境下,分别进行线程数为200、500、1000、2000、5000的测试。

第一轮测试:直连RDS

测试一:线程数200

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=hlj-prt-mdb.mysql.rds.aliyuncs.com --mysql-port=3306 --mysql-db=sysbenchtest --max-time=60 --max-requests=0   --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5  --num-threads=200 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 200
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 200, tps: 0.00, reads: 51489.83, writes: 14579.06, response time: 76.00ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 200, tps: 0.00, reads: 52579.37, writes: 15032.01, response time: 74.49ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 200, tps: 0.00, reads: 54902.03, writes: 15667.01, response time: 71.86ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 200, tps: 0.00, reads: 56939.61, writes: 16278.32, response time: 70.25ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 200, tps: 0.00, reads: 58722.04, writes: 16773.68, response time: 67.46ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 200, tps: 0.00, reads: 60160.36, writes: 17196.01, response time: 65.24ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 200, tps: 0.00, reads: 61805.67, writes: 17653.00, response time: 64.08ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 200, tps: 0.00, reads: 63027.71, writes: 18000.68, response time: 62.06ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 200, tps: 0.00, reads: 64217.62, writes: 18356.99, response time: 60.08ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 200, tps: 0.00, reads: 64923.97, writes: 18548.66, response time: 59.87ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 200, tps: 0.00, reads: 67396.09, writes: 19272.03, response time: 57.14ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 200, tps: 0.00, reads: 70185.72, writes: 20042.35, response time: 54.24ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 200, tps: 0.00, reads: 72913.66, writes: 20823.00, response time: 50.49ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 200, tps: 0.00, reads: 76311.59, writes: 21807.31, response time: 46.35ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 200, tps: 0.00, reads: 78385.41, writes: 22406.69, response time: 44.62ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 200, tps: 0.00, reads: 79635.22, writes: 22740.97, response time: 42.80ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 200, tps: 0.00, reads: 78399.06, writes: 22399.35, response time: 42.39ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 200, tps: 0.00, reads: 83106.65, writes: 23743.00, response time: 38.36ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 200, tps: 0.00, reads: 82669.25, writes: 23616.98, response time: 38.29ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 200, tps: 0.00, reads: 83678.24, writes: 23921.74, response time: 37.68ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            4085494
write:                           1167284
other:                           0
total:                           5252778
transactions:                        0      (0.00 per sec.)
read/write requests:                 5252778 (87499.65 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.0320s
total number of events:              291821
total time taken by event execution: 12002.9269s
response time:
min:                                 28.38ms
avg:                                 41.13ms
max:                                 99.60ms
approx.  95 percentile:              68.85ms
Threads fairness:
events (avg/stddev):           1459.1050/67.61
execution time (avg/stddev):   60.0146/0.01

平均QPS为87499,平均响应时间为41ms。

测试二: 线程数500

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=hlj-prt-mdb.mysql.rds.aliyuncs.com --mysql-port=3306 --mysql-db=sysbenchtest --max-time=60 --max-requests=0   --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5  --num-threads=500 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 500
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 500, tps: 0.00, reads: 61496.55, writes: 17274.78, response time: 144.78ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 500, tps: 0.00, reads: 57612.03, writes: 16474.77, response time: 149.04ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 500, tps: 0.00, reads: 56378.03, writes: 16057.67, response time: 151.06ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 500, tps: 0.00, reads: 60114.00, writes: 17209.00, response time: 145.82ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 500, tps: 0.00, reads: 61656.62, writes: 17542.32, response time: 145.26ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 500, tps: 0.00, reads: 61470.01, writes: 17639.67, response time: 145.17ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 500, tps: 0.00, reads: 59921.03, writes: 17057.01, response time: 146.65ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 500, tps: 0.00, reads: 60200.23, writes: 17239.97, response time: 146.70ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 500, tps: 0.00, reads: 60733.65, writes: 17345.00, response time: 146.61ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 500, tps: 0.00, reads: 62156.70, writes: 17785.34, response time: 145.08ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 500, tps: 0.00, reads: 62855.70, writes: 17886.01, response time: 144.73ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 500, tps: 0.00, reads: 62668.33, writes: 17853.00, response time: 142.16ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 500, tps: 0.00, reads: 60348.24, writes: 17261.64, response time: 145.69ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 500, tps: 0.00, reads: 60141.03, writes: 17323.68, response time: 146.96ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 500, tps: 0.00, reads: 61451.35, writes: 17479.67, response time: 145.47ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 500, tps: 0.00, reads: 62364.42, writes: 17840.69, response time: 142.93ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 500, tps: 0.00, reads: 61993.60, writes: 17759.65, response time: 144.30ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 500, tps: 0.00, reads: 60878.74, writes: 17427.35, response time: 144.82ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 500, tps: 0.00, reads: 61582.28, writes: 17433.98, response time: 144.56ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 500, tps: 0.00, reads: 62170.72, writes: 17850.68, response time: 142.93ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            3657458
write:                           1044988
other:                           0
total:                           4702446
transactions:                        0      (0.00 per sec.)
read/write requests:                 4702446 (78294.25 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.0612s
total number of events:              261247
total time taken by event execution: 30019.1330s
response time:
min:                                 39.21ms
avg:                                114.91ms
max:                                214.03ms
approx.  95 percentile:             145.91ms
Threads fairness:
events (avg/stddev):           522.4940/19.50
execution time (avg/stddev):   60.0383/0.01

平均QPS为78294,平均响应时间为114ms。

测试三:线程数1000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=hlj-prt-mdb.mysql.rds.aliyuncs.com --mysql-port=3306 --mysql-db=sysbenchtest --max-time=60 --max-requests=0   --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5  --num-threads=1000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 1000, tps: 0.00, reads: 65576.17, writes: 17990.19, response time: 490.44ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 1000, tps: 0.00, reads: 73092.93, writes: 20889.17, response time: 602.78ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 1000, tps: 0.00, reads: 65738.77, writes: 18760.70, response time: 493.53ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 1000, tps: 0.00, reads: 65297.52, writes: 18654.05, response time: 510.67ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 1000, tps: 0.00, reads: 67278.88, writes: 19234.11, response time: 497.54ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 1000, tps: 0.00, reads: 69235.85, writes: 19799.58, response time: 504.89ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 1000, tps: 0.00, reads: 65454.24, writes: 18819.97, response time: 492.06ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 1000, tps: 0.00, reads: 67564.33, writes: 19226.67, response time: 446.98ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 1000, tps: 0.00, reads: 67007.72, writes: 19108.25, response time: 484.02ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 1000, tps: 0.00, reads: 66787.81, writes: 19121.37, response time: 453.99ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 1000, tps: 0.00, reads: 67735.42, writes: 19385.36, response time: 481.86ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 1000, tps: 0.00, reads: 66848.22, writes: 19053.73, response time: 496.20ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 1000, tps: 0.00, reads: 66971.86, writes: 19120.20, response time: 488.68ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 1000, tps: 0.00, reads: 66567.88, writes: 19061.06, response time: 457.54ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 1000, tps: 0.00, reads: 68073.00, writes: 19449.33, response time: 455.76ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 1000, tps: 0.00, reads: 65128.44, writes: 18596.94, response time: 467.23ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 1000, tps: 0.00, reads: 66999.20, writes: 19188.06, response time: 456.85ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 1000, tps: 0.00, reads: 68210.18, writes: 19401.29, response time: 497.24ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 1000, tps: 0.00, reads: 67944.46, writes: 19395.04, response time: 445.64ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 1000, tps: 0.00, reads: 67274.60, writes: 19139.41, response time: 533.16ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            4038874
write:                           1153964
other:                           0
total:                           5192838
transactions:                        0      (0.00 per sec.)
read/write requests:                 5192838 (86327.06 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.1531s
total number of events:              288491
total time taken by event execution: 60060.5957s
response time:
min:                                 28.49ms
avg:                                208.19ms
max:                               2097.82ms
approx.  95 percentile:             491.91ms
Threads fairness:
events (avg/stddev):           288.4910/23.89
execution time (avg/stddev):   60.0606/0.03

平均QPS为86327,平均响应时间为208ms。

测试四:线程数2000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=hlj-prt-mdb.mysql.rds.aliyuncs.com --mysql-port=3306 --mysql-db=sysbenchtest --max-time=60 --max-requests=0   --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5  --num-threads=2000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 2000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 2000, tps: 0.00, reads: 54957.77, writes: 14308.59, response time: 1402.46ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 2000, tps: 0.00, reads: 62956.50, writes: 18030.28, response time: 1093.93ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 2000, tps: 0.00, reads: 67289.33, writes: 19187.19, response time: 1261.45ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 2000, tps: 0.00, reads: 58556.04, writes: 16718.01, response time: 1447.68ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 2000, tps: 0.00, reads: 64870.56, writes: 18549.30, response time: 1101.82ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 2000, tps: 0.00, reads: 60134.97, writes: 17228.66, response time: 1001.47ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 2000, tps: 0.00, reads: 62239.50, writes: 17739.62, response time: 1109.43ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 2000, tps: 0.00, reads: 60677.65, writes: 17374.42, response time: 1141.09ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 2000, tps: 0.00, reads: 62871.28, writes: 17875.99, response time: 1026.05ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 2000, tps: 0.00, reads: 61926.47, writes: 17682.09, response time: 1100.50ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 2000, tps: 0.00, reads: 57988.53, writes: 16603.25, response time: 1132.58ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 2000, tps: 0.00, reads: 44483.63, writes: 12734.32, response time: 1856.53ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 2000, tps: 0.00, reads: 54336.87, writes: 15544.63, response time: 1723.19ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 2000, tps: 0.00, reads: 50221.96, writes: 14302.89, response time: 1908.94ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 2000, tps: 0.00, reads: 48629.29, writes: 13843.18, response time: 1759.15ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 2000, tps: 0.00, reads: 59440.51, writes: 17114.33, response time: 1693.02ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 2000, tps: 0.00, reads: 57233.22, writes: 16259.25, response time: 1434.73ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 2000, tps: 0.00, reads: 62598.71, writes: 17965.68, response time: 1603.73ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 2000, tps: 0.00, reads: 54746.67, writes: 15587.33, response time: 1598.94ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 2000, tps: 0.00, reads: 65303.72, writes: 18647.35, response time: 1733.53ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            3523716
write:                           1006776
other:                           0
total:                           4530492
transactions:                        0      (0.00 per sec.)
read/write requests:                 4530492 (74905.80 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.4825s
total number of events:              251694
total time taken by event execution: 120315.0244s
response time:
min:                                 28.64ms
avg:                                478.02ms
max:                               6659.42ms
approx.  95 percentile:            1401.62ms
Threads fairness:
events (avg/stddev):           125.8470/13.04
execution time (avg/stddev):   60.1575/0.11

平均QPS为74905,平均响应时间为478ms。

测试五: 线程数5000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=hlj-prt-mdb.mysql.rds.aliyuncs.com --mysql-port=3306 --mysql-db=sysbenchtest --max-time=60 --max-requests=0   --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5  --num-threads=5000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 5000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 5000, tps: 0.00, reads: 30818.53, writes: 5682.11, response time: 2916.59ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 5000, tps: 0.00, reads: 31884.55, writes: 8920.60, response time: 3677.02ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 5000, tps: 0.00, reads: 29956.66, writes: 8451.80, response time: 3454.02ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 5000, tps: 0.00, reads: 28265.92, writes: 8166.98, response time: 3605.09ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 5000, tps: 0.00, reads: 28969.01, writes: 8236.10, response time: 3650.70ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 5000, tps: 0.00, reads: 29847.66, writes: 8510.57, response time: 3688.04ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 5000, tps: 0.00, reads: 28626.80, writes: 8186.04, response time: 3652.88ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 5000, tps: 0.00, reads: 29953.03, writes: 8499.91, response time: 3739.17ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 5000, tps: 0.00, reads: 31223.86, writes: 8829.39, response time: 3444.73ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 5000, tps: 0.00, reads: 29768.33, writes: 8739.14, response time: 3446.79ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 5000, tps: 0.00, reads: 29579.31, writes: 8357.09, response time: 3605.09ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 5000, tps: 0.00, reads: 31822.27, writes: 9174.51, response time: 3402.71ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 5000, tps: 0.00, reads: 32966.93, writes: 9309.46, response time: 3203.06ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 5000, tps: 0.00, reads: 30918.22, writes: 8935.40, response time: 3311.27ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 5000, tps: 0.00, reads: 31692.66, writes: 9073.00, response time: 3352.16ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 5000, tps: 0.00, reads: 30903.10, writes: 8786.17, response time: 3456.09ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 5000, tps: 0.00, reads: 32564.06, writes: 9309.78, response time: 3310.28ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 5000, tps: 0.00, reads: 32285.47, writes: 9262.13, response time: 3251.36ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 5000, tps: 0.00, reads: 30733.78, writes: 8827.94, response time: 3310.28ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 5000, tps: 0.00, reads: 28827.56, writes: 8218.21, response time: 3508.21ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1863050
write:                           532300
other:                           0
total:                           2395350
transactions:                        0      (0.00 per sec.)
read/write requests:                 2395350 (39155.25 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          61.1757s
total number of events:              133075
total time taken by event execution: 303636.6212s
response time:
min:                                144.65ms
avg:                               2281.70ms
max:                               6013.87ms
approx.  95 percentile:            3489.36ms
Threads fairness:
events (avg/stddev):           26.6150/2.25
execution time (avg/stddev):   60.7273/0.33

平均QPS为39155,平均响应时间为2281ms。

第二轮测试:PolarDB-X+RDS x4

测试一:线程数200

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser_123 --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=drdsbggamlqgcm2o.drds.aliyuncs.com --mysql-port=3306 --mysql-db=polardb2 --max-time=60 --max-requests=0 --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5 --mysql_table_options='dbpartition by hash(`id`) tbpartition by hash(`id`) tbpartitions 4' --num-threads=200 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 200
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 200, tps: 0.00, reads: 21627.75, writes: 6019.81, response time: 144.52ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 200, tps: 0.00, reads: 21270.72, writes: 6073.68, response time: 146.35ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 200, tps: 0.00, reads: 18989.99, writes: 5436.00, response time: 206.67ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 200, tps: 0.00, reads: 20875.34, writes: 5967.67, response time: 150.21ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 200, tps: 0.00, reads: 20757.33, writes: 5920.67, response time: 153.94ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 200, tps: 0.00, reads: 19384.33, writes: 5553.00, response time: 176.09ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 200, tps: 0.00, reads: 19979.01, writes: 5706.00, response time: 164.76ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 200, tps: 0.00, reads: 20602.99, writes: 5882.00, response time: 155.75ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 200, tps: 0.00, reads: 20958.99, writes: 5984.00, response time: 154.49ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 200, tps: 0.00, reads: 21391.99, writes: 6119.66, response time: 143.57ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 200, tps: 0.00, reads: 21364.65, writes: 6098.33, response time: 143.87ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 200, tps: 0.00, reads: 21223.37, writes: 6067.68, response time: 148.11ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 200, tps: 0.00, reads: 21498.00, writes: 6141.00, response time: 142.33ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 200, tps: 0.00, reads: 21230.34, writes: 6071.00, response time: 145.43ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 200, tps: 0.00, reads: 21533.00, writes: 6149.00, response time: 141.90ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 200, tps: 0.00, reads: 21383.33, writes: 6094.67, response time: 144.95ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 200, tps: 0.00, reads: 21464.97, writes: 6142.66, response time: 142.80ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 200, tps: 0.00, reads: 21401.32, writes: 6115.66, response time: 143.70ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 200, tps: 0.00, reads: 21181.05, writes: 6042.68, response time: 147.23ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 200, tps: 0.00, reads: 21288.32, writes: 6085.00, response time: 145.91ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1259160
write:                           359760
other:                           0
total:                           1618920
transactions:                        0      (0.00 per sec.)
read/write requests:                 1618920 (26930.05 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.1157s
total number of events:              89940
total time taken by event execution: 12011.0345s
response time:
min:                                108.48ms
avg:                                133.54ms
max:                                523.53ms
approx.  95 percentile:             151.34ms
Threads fairness:
events (avg/stddev):           449.7000/10.36
execution time (avg/stddev):   60.0552/0.03

平均QPS为26930,平均响应时间为133ms。

测试二: 线程数500

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser_123 --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=drdsbggamlqgcm2o.drds.aliyuncs.com --mysql-port=3306 --mysql-db=polardb2 --max-time=60 --max-requests=0 --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5 --mysql_table_options='dbpartition by hash(`id`) tbpartition by hash(`id`) tbpartitions 4' --num-threads=500 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 500
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 500, tps: 0.00, reads: 28323.75, writes: 7686.92, response time: 298.12ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 500, tps: 0.00, reads: 27240.38, writes: 7782.35, response time: 311.63ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 500, tps: 0.00, reads: 26256.34, writes: 7527.34, response time: 343.26ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 500, tps: 0.00, reads: 26271.02, writes: 7505.67, response time: 340.19ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 500, tps: 0.00, reads: 25550.29, writes: 7279.32, response time: 348.86ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 500, tps: 0.00, reads: 25214.36, writes: 7198.34, response time: 358.27ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 500, tps: 0.00, reads: 25608.68, writes: 7319.34, response time: 348.65ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 500, tps: 0.00, reads: 24325.99, writes: 7005.67, response time: 362.59ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 500, tps: 0.00, reads: 23807.33, writes: 6763.00, response time: 371.27ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 500, tps: 0.00, reads: 25011.34, writes: 7130.67, response time: 347.92ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 500, tps: 0.00, reads: 24871.65, writes: 7106.66, response time: 352.95ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 500, tps: 0.00, reads: 24792.66, writes: 7081.33, response time: 365.20ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 500, tps: 0.00, reads: 25166.34, writes: 7214.34, response time: 356.78ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 500, tps: 0.00, reads: 24642.34, writes: 7053.67, response time: 355.39ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 500, tps: 0.00, reads: 26317.34, writes: 7550.67, response time: 333.64ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 500, tps: 0.00, reads: 25409.66, writes: 7205.67, response time: 345.74ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 500, tps: 0.00, reads: 26157.34, writes: 7478.67, response time: 331.05ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 500, tps: 0.00, reads: 26432.99, writes: 7558.00, response time: 344.81ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 500, tps: 0.00, reads: 26846.34, writes: 7682.00, response time: 323.90ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 500, tps: 0.00, reads: 27043.67, writes: 7730.00, response time: 312.65ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1548540
write:                           442440
other:                           0
total:                           1990980
transactions:                        0      (0.00 per sec.)
read/write requests:                 1990980 (33085.07 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.1776s
total number of events:              110610
total time taken by event execution: 30050.0714s
response time:
min:                                152.42ms
avg:                                271.68ms
max:                                554.34ms
approx.  95 percentile:             346.05ms
Threads fairness:
events (avg/stddev):           221.2200/9.25
execution time (avg/stddev):   60.1001/0.05

平均QPS为33085,平均响应时间为271ms。

测试三:线程数1000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser_123 --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=drdsbggamlqgcm2o.drds.aliyuncs.com --mysql-port=3306 --mysql-db=polardb2 --max-time=60 --max-requests=0 --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5 --mysql_table_options='dbpartition by hash(`id`) tbpartition by hash(`id`) tbpartitions 4' --num-threads=1000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 1000, tps: 0.00, reads: 29510.19, writes: 7679.79, response time: 658.03ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 1000, tps: 0.00, reads: 27291.03, writes: 7674.01, response time: 724.62ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 1000, tps: 0.00, reads: 29109.78, writes: 8418.94, response time: 625.76ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 1000, tps: 0.00, reads: 28858.54, writes: 8263.73, response time: 620.17ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 1000, tps: 0.00, reads: 28677.38, writes: 8167.68, response time: 602.42ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 1000, tps: 0.00, reads: 28048.56, writes: 7987.64, response time: 654.50ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 1000, tps: 0.00, reads: 27543.77, writes: 7942.03, response time: 669.16ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 1000, tps: 0.00, reads: 28281.33, writes: 7928.00, response time: 642.85ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 1000, tps: 0.00, reads: 27988.00, writes: 8145.00, response time: 696.54ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 1000, tps: 0.00, reads: 27392.33, writes: 7783.33, response time: 684.35ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 1000, tps: 0.00, reads: 27757.28, writes: 7902.65, response time: 650.79ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 1000, tps: 0.00, reads: 28328.70, writes: 8137.01, response time: 643.43ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 1000, tps: 0.00, reads: 27796.64, writes: 7968.66, response time: 662.18ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 1000, tps: 0.00, reads: 27957.03, writes: 7880.01, response time: 661.19ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 1000, tps: 0.00, reads: 28191.28, writes: 8123.32, response time: 649.04ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 1000, tps: 0.00, reads: 28146.40, writes: 7949.35, response time: 661.99ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 1000, tps: 0.00, reads: 28031.60, writes: 8060.98, response time: 681.49ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 1000, tps: 0.00, reads: 27625.07, writes: 7956.02, response time: 660.40ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 1000, tps: 0.00, reads: 28378.00, writes: 8071.00, response time: 650.20ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 1000, tps: 0.00, reads: 28257.33, writes: 8091.33, response time: 648.65ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1694378
write:                           484108
other:                           0
total:                           2178486
transactions:                        0      (0.00 per sec.)
read/write requests:                 2178486 (36107.20 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.3338s
total number of events:              121027
total time taken by event execution: 60184.3550s
response time:
min:                                234.41ms
avg:                                497.28ms
max:                               1119.83ms
approx.  95 percentile:             657.25ms
Threads fairness:
events (avg/stddev):           121.0270/6.95
execution time (avg/stddev):   60.1844/0.09

平均QPS为36107,平均响应时间为497ms。

测试四:线程数2000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser_123 --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=drdsbggamlqgcm2o.drds.aliyuncs.com --mysql-port=3306 --mysql-db=polardb2 --max-time=60 --max-requests=0 --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5 --mysql_table_options='dbpartition by hash(`id`) tbpartition by hash(`id`) tbpartitions 4' --num-threads=2000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 2000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 2000, tps: 0.00, reads: 30295.65, writes: 6993.32, response time: 1168.05ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 2000, tps: 0.00, reads: 28700.76, writes: 8387.69, response time: 1313.87ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 2000, tps: 0.00, reads: 28102.34, writes: 7806.00, response time: 1250.92ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 2000, tps: 0.00, reads: 28817.59, writes: 8446.31, response time: 1267.51ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 2000, tps: 0.00, reads: 29307.35, writes: 8223.67, response time: 1206.79ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 2000, tps: 0.00, reads: 26770.06, writes: 7802.35, response time: 1361.10ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 2000, tps: 0.00, reads: 26284.33, writes: 7432.33, response time: 1306.42ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 2000, tps: 0.00, reads: 28026.68, writes: 7997.34, response time: 1291.64ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 2000, tps: 0.00, reads: 27431.00, writes: 7830.67, response time: 1267.13ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 2000, tps: 0.00, reads: 27466.66, writes: 7787.66, response time: 1275.88ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 2000, tps: 0.00, reads: 27775.87, writes: 8121.96, response time: 1229.76ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 2000, tps: 0.00, reads: 28149.85, writes: 8050.96, response time: 1290.09ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 2000, tps: 0.00, reads: 27765.94, writes: 7770.41, response time: 1296.67ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 2000, tps: 0.00, reads: 27261.00, writes: 7859.67, response time: 1324.53ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 2000, tps: 0.00, reads: 27804.99, writes: 8078.00, response time: 1238.63ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 2000, tps: 0.00, reads: 27728.97, writes: 7727.99, response time: 1273.21ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 2000, tps: 0.00, reads: 27785.02, writes: 7806.67, response time: 1226.45ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 2000, tps: 0.00, reads: 27234.34, writes: 7871.34, response time: 1246.81ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 2000, tps: 0.00, reads: 27435.66, writes: 7948.67, response time: 1253.55ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 2000, tps: 0.00, reads: 27920.35, writes: 7941.67, response time: 1244.20ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1683836
write:                           481096
other:                           0
total:                           2164932
transactions:                        0      (0.00 per sec.)
read/write requests:                 2164932 (35709.20 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          60.6267s
total number of events:              120274
total time taken by event execution: 120726.4484s
response time:
min:                                454.31ms
avg:                               1003.76ms
max:                               1782.21ms
approx.  95 percentile:            1267.51ms
Threads fairness:
events (avg/stddev):           60.1370/3.52
execution time (avg/stddev):   60.3632/0.16

平均QPS为35709,平均响应时间为1003ms。

测试五:线程数5000

/usr/local/bin/sysbench --test='/usr/local/share/sysbench/oltp_drds.lua' --oltp_tables_count=4 --oltp-table-size=100000000  --mysql-user=sysbenchuser --mysql-password=sysbenchuser_123 --mysql-table-engine=innodb  --rand-init=on --report-interval=3 --mysql-host=drdsbggamlqgcm2o.drds.aliyuncs.com --mysql-port=3306 --mysql-db=polardb2 --max-time=60 --max-requests=0 --oltp_skip_trx=on --oltp_auto_inc=off --oltp_secondary --oltp_range_size=5 --mysql_table_options='dbpartition by hash(`id`) tbpartition by hash(`id`) tbpartitions 4' --num-threads=5000 run
sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 5000
Report intermediate results every 3 second(s)
Initializing random number generator from timer.
Random number generator seed is 0 and will be ignored
Initializing worker threads...
Threads started!
[   3s] threads: 5000, tps: 0.00, reads: 17264.68, writes: 0.00, response time: 0.00ms (95%), errors: 0.00, reconnects:  0.00
[   6s] threads: 5000, tps: 0.00, reads: 72.33, writes: 1.33, response time: 0.00ms (95%), errors: 0.00, reconnects:  0.00
[   9s] threads: 5000, tps: 0.00, reads: 76.67, writes: 0.00, response time: 0.00ms (95%), errors: 0.00, reconnects:  0.00
[  12s] threads: 5000, tps: 0.00, reads: 4000.03, writes: 1312.34, response time: 11891.34ms (95%), errors: 0.00, reconnects:  0.00
[  15s] threads: 5000, tps: 0.00, reads: 22518.87, writes: 6282.96, response time: 13910.78ms (95%), errors: 0.00, reconnects:  0.00
[  18s] threads: 5000, tps: 0.00, reads: 4328.00, writes: 964.67, response time: 5205.08ms (95%), errors: 0.00, reconnects:  0.00
[  21s] threads: 5000, tps: 0.00, reads: 5317.67, writes: 1762.00, response time: 7348.33ms (95%), errors: 0.00, reconnects:  0.00
[  24s] threads: 5000, tps: 0.00, reads: 27470.96, writes: 8056.42, response time: 10346.18ms (95%), errors: 0.00, reconnects:  0.00
[  27s] threads: 5000, tps: 0.00, reads: 15312.43, writes: 4636.36, response time: 4371.56ms (95%), errors: 0.00, reconnects:  0.00
[  30s] threads: 5000, tps: 0.00, reads: 24617.98, writes: 7310.99, response time: 6275.93ms (95%), errors: 0.00, reconnects:  0.00
[  33s] threads: 5000, tps: 0.00, reads: 21144.93, writes: 6549.98, response time: 4344.17ms (95%), errors: 0.00, reconnects:  0.00
[  36s] threads: 5000, tps: 0.00, reads: 18023.73, writes: 4627.02, response time: 5117.02ms (95%), errors: 0.00, reconnects:  0.00
[  39s] threads: 5000, tps: 0.00, reads: 17269.27, writes: 5412.31, response time: 6125.59ms (95%), errors: 0.00, reconnects:  0.00
[  42s] threads: 5000, tps: 0.00, reads: 18731.41, writes: 4744.69, response time: 6214.24ms (95%), errors: 0.00, reconnects:  0.00
[  45s] threads: 5000, tps: 0.00, reads: 11848.99, writes: 3288.33, response time: 5690.72ms (95%), errors: 0.00, reconnects:  0.00
[  48s] threads: 5000, tps: 0.00, reads: 24333.00, writes: 7100.00, response time: 7578.42ms (95%), errors: 0.00, reconnects:  0.00
[  51s] threads: 5000, tps: 0.00, reads: 23991.97, writes: 7106.33, response time: 5299.41ms (95%), errors: 0.00, reconnects:  0.00
[  54s] threads: 5000, tps: 0.00, reads: 24291.33, writes: 7068.33, response time: 5465.34ms (95%), errors: 0.00, reconnects:  0.00
[  57s] threads: 5000, tps: 0.00, reads: 24518.73, writes: 7155.02, response time: 5060.66ms (95%), errors: 0.00, reconnects:  0.00
[  60s] threads: 5000, tps: 0.00, reads: 24981.91, writes: 7256.31, response time: 4911.42ms (95%), errors: 0.00, reconnects:  0.00
OLTP test statistics:
queries performed:
read:                            1016554
write:                           290444
other:                           0
total:                           1306998
transactions:                        0      (0.00 per sec.)
read/write requests:                 1306998 (21117.27 per sec.)
other operations:                    0      (0.00 per sec.)
ignored errors:                      0      (0.00 per sec.)
reconnects:                          0      (0.00 per sec.)
General statistics:
total time:                          61.8924s
total number of events:              72611
total time taken by event execution: 305474.5894s
response time:
min:                                139.32ms
avg:                               4207.00ms
max:                              14077.55ms
approx.  95 percentile:           12263.68ms
Threads fairness:
events (avg/stddev):           14.5222/4.45
execution time (avg/stddev):   61.0949/0.54

平均QPS为21117,平均响应时间为4207ms。

不同线程数下两种环境的QPS表现:

不同线程数下两种环境的响应时间(ms):

可以看出:

两轮测试过程中,直连RDS QPS比PolarDB-X + RDS x4要高的多,差不多是两倍的关系,我分析原因为:OLTP场景下,索引选择良好,单次SQL消耗时间并不长,而 PolarDB-X对会话的路由时间消耗太多,以至于QPS跑步上去。

而且响应时间, 直连RDS也比PolarDB-X + RDS x4要快,线程数越多,差异越大。

直连RDS测试过程中,CPU使用率和IOPS监控:

PolarDB-X + RDS x4环境下 CPU使用率和IOPS监控:

可以看出:

两轮测试中,直连RDS要比 PolarDB-X + RDS x4 CPU和IOPS使用率都高,我分析有两方面原因:

1)PolarDB-X + RDS x4将数据分散在4个RDS实例中,因此CPU和IO消耗全部分散到各个实例中;

2)PolarDB-X + RDS x4环境中,QPS本身就比直连RDS要低,资源使用率没有上去。

通过这两轮测试总结:

1)相同线程数,PolarDB-X下RDS的资源消耗更低,因为资源消耗分散到了不同RDS节点;

2)相同线程数,直连RDS要比 PolarDB-X+RDS吞吐量更高,rt更低;

3)针对于OLTP这样的场景,如果应用系统并发量不高,可能还不如用RDS更舒服。

PolarDB-X 1.0和RDS性能对比之吞吐量对比(三)相关推荐

  1. PolarDB-X 1.0和RDS性能对比之吞吐量对比(二)

    测试环境: PolarDB-X 标准版:16C64G(1台) RDS MySQL5.7: 16C64G(4台) ECS 压测机: 8C16G(1台) sysbench 0.5 通过阿里云官方文档,找到 ...

  2. 自建数据库与云数据库RDS性能优势与优缺点对比

    很多人对数据库是什么不是很清楚,那么数据库到底是什么呢?传统数据库是依照某种数据模型组织起来并存放二级存储器中的数据集合.这种数据集合具有如下特点:尽可能不重复,以最优方式为某个特定组织的多种应用服务 ...

  3. Nacos 2.0 升级前后性能对比压测

    简介:Nacos 2.0 通过升级通信协议和框架.数据模型的方式将性能提升了约 10 倍,解决继 Nacos 1.0 发布逐步暴露的性能问题.本文通过压测 Nacos 1.0,Nacos 1.0 升级 ...

  4. ufs2.0测试软件,最新的UFS2.0闪存性能对比,小米MIX亮了

    原标题:最新的UFS2.0闪存性能对比,小米MIX亮了 智能手机配置上,用户最关注的就是处理器,而对于内存组合,基本上都是大一点就行了,但是对于厂商来说,内存组合很重要,因为要靠它们进行标准版.高配版 ...

  5. centos amd双显卡_PCIe4.0和PCIe3.0对显卡性能差别大吗?

    众所周知,AMD X570.B550主板,包括RX3000系列显卡,率先支持了PCIe 4.0协议,高达32GB/s带宽,相比现在的PCIe3.0带宽足足翻了一倍,也是AMD新平台一大卖点,然而int ...

  6. amazon rds 性能_Amazon S3 —云文件存储可提高性能并节省成本

    amazon rds 性能 by Kangze Huang 黄康泽 Amazon S3 -云文件存储可提高性能并节省成本 (Amazon S3 - Cloud File Storage for Per ...

  7. 【Elasticsearch】es 5.3.0 bulk index 性能调优实践

    1.概述 转载:elasticsearch5.3.0 bulk index 性能调优实践 一.集群基本信息 每天日志量70亿 ES版本: 5.3.0 机器部署 master node: 3台 data ...

  8. 我说CMMI2.0之管理性能和度量数据

    MPM(managing performance and measurement)是CMMI DEV V2.0中实践最多的一个实践域.它将组织级的.项目级的度量实践,以及统计的和非统计的量化管理都融合 ...

  9. 2013年度ARM芯片图形性能跑分横向对比

    近年来智能手机快速发展,ARM架构的芯片产业得到了长足的进步.在2009年,诺基亚的旗舰手机N97不过采用了434MHz的ARM11处理器,如今的三星Note3.HTC One,索尼Z1这类旗舰手机都 ...

最新文章

  1. MySQL安装查看密码修改密码
  2. 关于unity 中使用AssetBundle加载资源,shader偶尔会丢失的问题解决办法
  3. php对象当参数传递 php深复制和浅复制
  4. Servlet组件之一——Filter过滤器
  5. wikioi 1160 蛇形矩阵
  6. 我计划搞直播了,欢迎来一起聊一聊
  7. msvcr80.dll 问题
  8. Android Studio搭建Tensorflow Lite项目和加载tflite模型文件
  9. synaptics触摸板_使用Dell Synaptics触摸板修复Firefox滚动问题
  10. python矩形法求定积分_如何用矩形法(梯形法)求定积分
  11. Scrapy爬取天眼查首页热门公司信息,可视化分析这些热门公司
  12. 概率初步入门(含贝叶斯公式,全概率公式)
  13. 【零基础小白的华丽蜕变】AIX 操作系统 + ODM 库 + SMIT 工具
  14. 5个UI界面设计网站,马住了
  15. python象棋博弈算法_python做中国国粹——象棋
  16. [笔记] Codeforces#274 Riding in a Lift (479E) DP
  17. Windows XP IIS PHP5详细配置
  18. LaTex创建四级目录
  19. java学习方法和经验
  20. 监控服务器网卡上传和下载网速的脚本

热门文章

  1. jQueryDOM节点操作总结
  2. 系统提速知多少,我的电脑可以提速吗?
  3. spring定时任务Scheduled与定时任务线程池配置SchedulingConfigurer ,Java
  4. 2021年Android开发者跳槽指南,Android工程师面试该怎么准备?附答案
  5. 【电商必备】增长销售和客户在线支持的网站即时聊天(一)
  6. 王爽老师版汇编语言课程设计2
  7. 初学HTML5--盒子模型,5.1 盒子模型 - Adobe Dreamweaver CC零基础入门教程 - 平面设计学院 - 勤学网...
  8. python中else的用法_Python循环语句中else的用法总结
  9. Mac与iPhone屏幕录制
  10. PHP入门基础与实战技巧