YKG / hptc-shichendahai

2 stars 2 forks source link

sysbench oltp_update_index (primary、key)vs (no-primary、no-key) #11

Open xiaodong-ji opened 4 years ago

xiaodong-ji commented 4 years ago

环境描述

组件 CPU(核) 内存(GB) 存储类型 网络 操作系统 IP 地址
sysbench 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.10
TiDB 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.18
PD 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.18
PD 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.19
PD 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.20
TiKV 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.18
TiKV 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.19
TiKV 40 256 SSD 万兆网卡 CentOS 7.5 192.168.0.20

sysbench 性能测试

sysbench 不同场景对应的 SQL

测试环境初始化

  1. sysbench 工具安装

    # yum -y install make automake libtool pkgconfig libaio-devel
    # yum -y install mariadb-devel openssl-devel
    # mkdir sysbench
    # cd sysbench
    # wget https://github.com/akopytov/sysbench/archive/1.0.20.tar.gz
    # tar -zxvf 1.0.20.tar.gz 
    # cd sysbench-1.0.20/
    # ./autogen.sh 
    # ./configure
    # make -j
    # make install
    # sysbench --version
    sysbench 1.0.20
  2. sysbench 测试准备

    • 创建数据库
      # mysql -u root -h 192.168.0.18 -P 4000
      mysql> create database sysbench;

// 使用 sysbench 工具生成数据 // oltp_update_index

sysbench --config-file=config oltp_update_index --tables=10 --table-size=10000 prepare

// 导入结束后再设置回悲观模式 mysql> set global tidb_disable_txn_auto_retry=on; mysql> set global tidb_txn_mode="pessimistic";

// 数据预热与统计信息收集 SELECT COUNT(pad) FROM sbtest1 USE INDEX(k_1); ...... SELECT COUNT(pad) FROM sbtest10 USE INDEX(k_1);

ANALYZE TABLE sbtest1; ...... ANALYZE TABLE sbtest10;


### sysbench 场景测试
1. Update index(primary、key)场景测试

- 并发度:1

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=1 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1 tps: 1773.54 qps: 1773.54 (r/w/o: 0.00/138.56/1634.97) lat (ms,95%): 2.18 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1 tps: 1783.25 qps: 1783.25 (r/w/o: 0.00/132.80/1650.44) lat (ms,95%): 2.14 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1 tps: 1817.80 qps: 1817.80 (r/w/o: 0.00/135.90/1681.90) lat (ms,95%): 2.14 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1 tps: 1771.00 qps: 1771.00 (r/w/o: 0.00/142.10/1628.90) lat (ms,95%): 2.14 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1 tps: 1726.80 qps: 1726.80 (r/w/o: 0.00/136.70/1590.10) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 8211 other: 98414 total: 106625 transactions: 106625 (1776.93 per sec.) queries: 106625 (1776.93 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0028s total number of events: 106625

Latency (ms): min: 0.35 avg: 0.56 max: 25.40 95th percentile: 2.14 sum: 59972.87

Threads fairness: events (avg/stddev): 106625.0000/0.00 execution time (avg/stddev): 59.9729/0.00


- 并发度:8

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=8 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 8 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 8 tps: 10155.44 qps: 10155.44 (r/w/o: 0.00/780.40/9375.03) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 8 tps: 10115.78 qps: 10115.78 (r/w/o: 0.00/787.81/9327.97) lat (ms,95%): 3.43 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 8 tps: 10221.29 qps: 10221.29 (r/w/o: 0.00/770.90/9450.39) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 8 tps: 9968.72 qps: 9968.72 (r/w/o: 0.00/767.90/9200.81) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 8 tps: 10210.89 qps: 10210.89 (r/w/o: 0.00/781.40/9429.49) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 8 tps: 10000.07 qps: 10000.07 (r/w/o: 0.00/771.70/9228.37) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 46607 other: 560147 total: 606754 transactions: 606754 (10111.22 per sec.) queries: 606754 (10111.22 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0058s total number of events: 606754

Latency (ms): min: 0.34 avg: 0.79 max: 54.77 95th percentile: 3.36 sum: 479838.78

Threads fairness: events (avg/stddev): 75844.2500/404.41 execution time (avg/stddev): 59.9798/0.00


- 并发度:16

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=16 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 16 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 16 tps: 17901.01 qps: 17901.01 (r/w/o: 0.00/1362.47/16538.54) lat (ms,95%): 3.82 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 16 tps: 18006.39 qps: 18006.39 (r/w/o: 0.00/1381.01/16625.37) lat (ms,95%): 3.89 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 16 tps: 17496.41 qps: 17496.41 (r/w/o: 0.00/1368.80/16127.61) lat (ms,95%): 3.96 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 16 tps: 17608.90 qps: 17608.90 (r/w/o: 0.00/1355.90/16253.00) lat (ms,95%): 3.96 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 16 tps: 17530.11 qps: 17530.11 (r/w/o: 0.00/1351.20/16178.91) lat (ms,95%): 3.89 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 81974 other: 980592 total: 1062566 transactions: 1062566 (17708.00 per sec.) queries: 1062566 (17708.00 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0026s total number of events: 1062566

Latency (ms): min: 0.35 avg: 0.90 max: 203.54 95th percentile: 3.89 sum: 959706.77

Threads fairness: events (avg/stddev): 66410.3750/292.46 execution time (avg/stddev): 59.9817/0.00


- 并发度:32

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=32 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 32 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 32 tps: 30658.90 qps: 30658.90 (r/w/o: 0.00/2323.44/28335.46) lat (ms,95%): 4.65 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 32 tps: 30839.49 qps: 30839.49 (r/w/o: 0.00/2341.01/28498.48) lat (ms,95%): 4.65 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 32 tps: 30879.88 qps: 30879.88 (r/w/o: 0.00/2345.60/28534.28) lat (ms,95%): 4.65 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 32 tps: 30541.32 qps: 30541.32 (r/w/o: 0.00/2374.80/28166.52) lat (ms,95%): 4.65 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 32 tps: 30843.78 qps: 30843.78 (r/w/o: 0.00/2380.70/28463.09) lat (ms,95%): 4.57 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 32 tps: 31246.40 qps: 31246.40 (r/w/o: 0.00/2415.07/28831.33) lat (ms,95%): 4.57 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 141822 other: 1708380 total: 1850202 transactions: 1850202 (30833.73 per sec.) queries: 1850202 (30833.73 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0035s total number of events: 1850202

Latency (ms): min: 0.41 avg: 1.04 max: 201.07 95th percentile: 4.65 sum: 1919467.58

Threads fairness: events (avg/stddev): 57818.8125/378.33 execution time (avg/stddev): 59.9834/0.00


- 并发度:64

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=64 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 64 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 64 tps: 50234.80 qps: 50234.80 (r/w/o: 0.00/3824.65/46410.15) lat (ms,95%): 5.67 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 64 tps: 51166.95 qps: 51166.95 (r/w/o: 0.00/3912.02/47254.93) lat (ms,95%): 5.57 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 64 tps: 51661.06 qps: 51661.06 (r/w/o: 0.00/3946.40/47714.66) lat (ms,95%): 5.47 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 64 tps: 51050.12 qps: 51050.12 (r/w/o: 0.00/3947.80/47102.32) lat (ms,95%): 5.57 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 64 tps: 49958.32 qps: 49958.32 (r/w/o: 0.00/3828.91/46129.41) lat (ms,95%): 5.57 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 64 tps: 50624.32 qps: 50624.32 (r/w/o: 0.00/3879.46/46744.86) lat (ms,95%): 5.57 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 233428 other: 2813731 total: 3047159 transactions: 3047159 (50776.02 per sec.) queries: 3047159 (50776.02 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0095s total number of events: 3047159

Latency (ms): min: 0.38 avg: 1.26 max: 245.15 95th percentile: 5.57 sum: 3839135.87

Threads fairness: events (avg/stddev): 47611.8594/300.06 execution time (avg/stddev): 59.9865/0.00


- 并发度:128

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=128 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 128 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 128 tps: 68364.40 qps: 68364.40 (r/w/o: 0.00/5210.67/63153.73) lat (ms,95%): 8.28 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 128 tps: 68044.51 qps: 68044.51 (r/w/o: 0.00/5183.79/62860.72) lat (ms,95%): 8.43 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 128 tps: 63138.96 qps: 63138.96 (r/w/o: 0.00/4860.15/58278.81) lat (ms,95%): 8.58 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 128 tps: 67210.22 qps: 67210.22 (r/w/o: 0.00/5159.17/62051.05) lat (ms,95%): 8.28 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 128 tps: 69416.53 qps: 69416.53 (r/w/o: 0.00/5290.69/64125.84) lat (ms,95%): 8.13 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 128 tps: 67467.57 qps: 67467.57 (r/w/o: 0.00/5184.12/62283.45) lat (ms,95%): 8.43 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 308967 other: 3727783 total: 4036750 transactions: 4036750 (67264.99 per sec.) queries: 4036750 (67264.99 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0104s total number of events: 4036750

Latency (ms): min: 0.37 avg: 1.90 max: 332.29 95th percentile: 8.28 sum: 7678795.64

Threads fairness: events (avg/stddev): 31537.1094/276.20 execution time (avg/stddev): 59.9906/0.00


- 并发度:256

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=256 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 256 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 256 tps: 86419.28 qps: 86419.18 (r/w/o: 0.00/6616.44/79802.74) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 256 tps: 85697.63 qps: 85697.73 (r/w/o: 0.00/6527.33/79170.40) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 256 tps: 80924.09 qps: 80924.09 (r/w/o: 0.00/6227.59/74696.50) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 256 tps: 85596.99 qps: 85596.99 (r/w/o: 0.00/6559.51/79037.49) lat (ms,95%): 13.46 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 256 tps: 84626.84 qps: 84626.84 (r/w/o: 0.00/6535.80/78091.04) lat (ms,95%): 12.75 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 256 tps: 85998.51 qps: 85998.51 (r/w/o: 0.00/6617.52/79380.99) lat (ms,95%): 12.52 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 390974 other: 4702225 total: 5093199 transactions: 5093199 (84743.65 per sec.) queries: 5093199 (84743.65 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0990s total number of events: 5093199

Latency (ms): min: 0.38 avg: 3.02 max: 381.01 95th percentile: 13.46 sum: 15360545.86

Threads fairness: events (avg/stddev): 19895.3086/229.92 execution time (avg/stddev): 60.0021/0.01


- 并发度:512

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=512 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 512 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 512 tps: 123507.69 qps: 123507.69 (r/w/o: 0.00/9458.25/114049.45) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 512 tps: 123280.58 qps: 123280.58 (r/w/o: 0.00/9461.32/113819.26) lat (ms,95%): 14.21 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 512 tps: 118297.95 qps: 118297.95 (r/w/o: 0.00/9051.81/109246.14) lat (ms,95%): 14.21 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 512 tps: 113567.52 qps: 113567.52 (r/w/o: 0.00/8664.30/104903.22) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 512 tps: 111249.24 qps: 111249.04 (r/w/o: 0.00/8546.50/102702.54) lat (ms,95%): 13.95 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 512 tps: 114282.01 qps: 114282.21 (r/w/o: 0.00/8732.88/105549.34) lat (ms,95%): 13.46 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 539348 other: 6503703 total: 7043051 transactions: 7043051 (117078.53 per sec.) queries: 7043051 (117078.53 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.1544s total number of events: 7043051

Latency (ms): min: 0.43 avg: 4.36 max: 690.83 95th percentile: 13.95 sum: 30723088.77

Threads fairness: events (avg/stddev): 13755.9590/148.05 execution time (avg/stddev): 60.0060/0.01


- 并发度:1024

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=1024 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1024 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1024 tps: 106801.32 qps: 106801.22 (r/w/o: 0.00/8133.94/98667.28) lat (ms,95%): 33.72 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1024 tps: 103933.40 qps: 103933.50 (r/w/o: 0.00/7988.49/95945.01) lat (ms,95%): 35.59 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1024 tps: 101355.69 qps: 101355.69 (r/w/o: 0.00/7789.94/93565.75) lat (ms,95%): 35.59 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1024 tps: 102554.25 qps: 102554.15 (r/w/o: 0.00/7927.05/94627.10) lat (ms,95%): 34.33 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1024 tps: 103955.25 qps: 103955.25 (r/w/o: 0.00/7943.21/96012.04) lat (ms,95%): 30.81 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 1024 tps: 103929.68 qps: 103929.78 (r/w/o: 0.00/7930.20/95999.58) lat (ms,95%): 27.17 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 477913 other: 5755493 total: 6233406 transactions: 6233406 (103557.46 per sec.) queries: 6233406 (103557.46 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.1904s total number of events: 6233406

Latency (ms): min: 0.60 avg: 9.86 max: 589.86 95th percentile: 33.72 sum: 61445524.56

Threads fairness: events (avg/stddev): 6087.3105/85.94 execution time (avg/stddev): 60.0054/0.01


2. Update index(primary、unique key)场景测试

- 准备数据与预热

// 导入前设置为乐观事务模式 mysql> set global tidb_disable_txn_auto_retry=off; mysql> set global tidb_txn_mode="optimistic";

// 使用 sysbench 工具生成数据 // oltp_update_non_index

sysbench --config-file=config oltp_update_index --tables=10 --table-size=10000 prepare

// 导入结束后再设置回悲观模式 mysql> set global tidb_disable_txn_auto_retry=on; mysql> set global tidb_txn_mode="pessimistic";

// 将 k_1 重置为多列的唯一索引 alter table sbtest1 drop index k_1; ...... alter table sbtest10 drop index k_10;

alter table sbtest1 add unique key k_1 (k,c); ...... alter table sbtest10 add unique key k_10 (k, c);

// 数据预热与统计信息收集 SELECT COUNT(pad) FROM sbtest1 USE INDEX(k_1); ...... SELECT COUNT(pad) FROM sbtest10 USE INDEX(k_1);

ANALYZE TABLE sbtest1; ...... ANALYZE TABLE sbtest10;


- 并发度:1

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=1 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1 tps: 1562.49 qps: 1562.49 (r/w/o: 0.00/115.67/1446.82) lat (ms,95%): 2.91 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1 tps: 1561.34 qps: 1561.34 (r/w/o: 0.00/118.70/1442.64) lat (ms,95%): 2.91 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1 tps: 1530.30 qps: 1530.30 (r/w/o: 0.00/119.70/1410.60) lat (ms,95%): 2.91 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1 tps: 1552.70 qps: 1552.70 (r/w/o: 0.00/121.10/1431.60) lat (ms,95%): 2.91 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1 tps: 1523.50 qps: 1523.50 (r/w/o: 0.00/123.30/1400.20) lat (ms,95%): 2.91 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 7155 other: 85594 total: 92749 transactions: 92749 (1545.69 per sec.) queries: 92749 (1545.69 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0026s total number of events: 92749

Latency (ms): min: 0.39 avg: 0.65 max: 23.17 95th percentile: 2.91 sum: 59973.64

Threads fairness: events (avg/stddev): 92749.0000/0.00 execution time (avg/stddev): 59.9736/0.00


- 并发度:8

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=8 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 8 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 8 tps: 10011.91 qps: 10011.91 (r/w/o: 0.00/747.81/9264.10) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 8 tps: 9794.72 qps: 9794.72 (r/w/o: 0.00/746.62/9048.10) lat (ms,95%): 3.43 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 8 tps: 9972.01 qps: 9972.01 (r/w/o: 0.00/743.60/9228.41) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 8 tps: 9840.20 qps: 9840.20 (r/w/o: 0.00/766.30/9073.90) lat (ms,95%): 3.43 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 8 tps: 9627.70 qps: 9627.70 (r/w/o: 0.00/745.10/8882.60) lat (ms,95%): 3.43 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 8 tps: 9962.37 qps: 9962.37 (r/w/o: 0.00/754.40/9207.97) lat (ms,95%): 3.36 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 45043 other: 547077 total: 592120 transactions: 592120 (9867.80 per sec.) queries: 592120 (9867.80 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0030s total number of events: 592120

Latency (ms): min: 0.39 avg: 0.81 max: 43.30 95th percentile: 3.36 sum: 479839.41

Threads fairness: events (avg/stddev): 74015.0000/201.03 execution time (avg/stddev): 59.9799/0.00


- 并发度:16

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=16 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 16 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 16 tps: 16680.54 qps: 16680.54 (r/w/o: 0.00/1281.43/15399.10) lat (ms,95%): 4.25 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 16 tps: 15877.86 qps: 15877.86 (r/w/o: 0.00/1217.94/14659.93) lat (ms,95%): 4.49 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 16 tps: 16273.31 qps: 16273.31 (r/w/o: 0.00/1242.08/15031.24) lat (ms,95%): 4.33 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 16 tps: 16529.39 qps: 16529.39 (r/w/o: 0.00/1270.52/15258.87) lat (ms,95%): 4.33 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 16 tps: 16461.21 qps: 16461.21 (r/w/o: 0.00/1240.78/15220.43) lat (ms,95%): 4.18 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 16 tps: 16502.48 qps: 16502.48 (r/w/o: 0.00/1293.51/15208.97) lat (ms,95%): 4.18 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 75472 other: 907830 total: 983302 transactions: 983302 (16386.55 per sec.) queries: 983302 (16386.55 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0044s total number of events: 983302

Latency (ms): min: 0.40 avg: 0.98 max: 143.09 95th percentile: 4.33 sum: 959744.35

Threads fairness: events (avg/stddev): 61456.3750/272.00 execution time (avg/stddev): 59.9840/0.00


- 并发度:32

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=32 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 32 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 32 tps: 28989.41 qps: 28989.41 (r/w/o: 0.00/2231.06/26758.35) lat (ms,95%): 5.09 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 32 tps: 28545.75 qps: 28545.75 (r/w/o: 0.00/2198.11/26347.64) lat (ms,95%): 5.09 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 32 tps: 28920.31 qps: 28920.31 (r/w/o: 0.00/2228.10/26692.21) lat (ms,95%): 5.09 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 32 tps: 26727.18 qps: 26727.18 (r/w/o: 0.00/2057.40/24669.78) lat (ms,95%): 5.28 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 32 tps: 28863.12 qps: 28863.12 (r/w/o: 0.00/2199.60/26663.52) lat (ms,95%): 5.18 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 32 tps: 28283.64 qps: 28283.64 (r/w/o: 0.00/2177.16/26106.48) lat (ms,95%): 5.18 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 130929 other: 1572481 total: 1703410 transactions: 1703410 (28386.90 per sec.) queries: 1703410 (28386.90 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0047s total number of events: 1703410

Latency (ms): min: 0.36 avg: 1.13 max: 204.02 95th percentile: 5.09 sum: 1919490.17

Threads fairness: events (avg/stddev): 53231.5625/237.75 execution time (avg/stddev): 59.9841/0.00


- 并发度:64

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=64 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 64 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 64 tps: 47836.81 qps: 47836.81 (r/w/o: 0.00/3667.62/44169.19) lat (ms,95%): 6.43 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 64 tps: 47456.21 qps: 47456.21 (r/w/o: 0.00/3649.91/43806.30) lat (ms,95%): 6.32 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 64 tps: 47417.31 qps: 47417.31 (r/w/o: 0.00/3612.20/43805.11) lat (ms,95%): 6.32 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 64 tps: 47080.97 qps: 47080.97 (r/w/o: 0.00/3641.10/43439.87) lat (ms,95%): 6.32 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 64 tps: 46291.41 qps: 46291.41 (r/w/o: 0.00/3565.80/42725.61) lat (ms,95%): 6.43 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 64 tps: 46127.46 qps: 46127.46 (r/w/o: 0.00/3522.84/42604.62) lat (ms,95%): 6.55 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 216631 other: 2605655 total: 2822286 transactions: 2822286 (47024.15 per sec.) queries: 2822286 (47024.15 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0156s total number of events: 2822286

Latency (ms): min: 0.41 avg: 1.36 max: 223.42 95th percentile: 6.43 sum: 3839169.53

Threads fairness: events (avg/stddev): 44098.2188/310.68 execution time (avg/stddev): 59.9870/0.00


- 并发度:128

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=128 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 128 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 128 tps: 63403.90 qps: 63403.90 (r/w/o: 0.00/4832.31/58571.59) lat (ms,95%): 9.91 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 128 tps: 59965.21 qps: 59965.21 (r/w/o: 0.00/4596.53/55368.68) lat (ms,95%): 10.27 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 128 tps: 58780.02 qps: 58780.02 (r/w/o: 0.00/4490.19/54289.83) lat (ms,95%): 9.73 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 128 tps: 62509.41 qps: 62509.41 (r/w/o: 0.00/4813.80/57695.61) lat (ms,95%): 9.56 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 128 tps: 61707.97 qps: 61707.97 (r/w/o: 0.00/4720.28/56987.69) lat (ms,95%): 9.22 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 128 tps: 63003.86 qps: 63003.86 (r/w/o: 0.00/4832.76/58171.10) lat (ms,95%): 9.39 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 282960 other: 3411544 total: 3694504 transactions: 3694504 (61560.51 per sec.) queries: 3694504 (61560.51 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0119s total number of events: 3694504

Latency (ms): min: 0.38 avg: 2.08 max: 309.43 95th percentile: 9.73 sum: 7679151.20

Threads fairness: events (avg/stddev): 28863.3125/325.65 execution time (avg/stddev): 59.9934/0.00


- 并发度:512

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=512 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 512 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 512 tps: 112911.93 qps: 112911.83 (r/w/o: 0.00/8627.75/104284.08) lat (ms,95%): 18.61 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 512 tps: 112277.07 qps: 112277.07 (r/w/o: 0.00/8605.97/103671.09) lat (ms,95%): 18.28 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 512 tps: 107447.80 qps: 107447.90 (r/w/o: 0.00/8292.05/99155.85) lat (ms,95%): 17.63 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 512 tps: 108254.41 qps: 108254.41 (r/w/o: 0.00/8347.97/99906.44) lat (ms,95%): 17.32 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 512 tps: 106643.01 qps: 106643.01 (r/w/o: 0.00/8206.02/98436.98) lat (ms,95%): 17.32 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 512 tps: 97040.33 qps: 97040.33 (r/w/o: 0.00/7405.61/89634.71) lat (ms,95%): 20.74 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 495081 other: 5951959 total: 6447040 transactions: 6447040 (107242.30 per sec.) queries: 6447040 (107242.30 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.1143s total number of events: 6447040

Latency (ms): min: 0.41 avg: 4.77 max: 937.08 95th percentile: 18.28 sum: 30725540.93

Threads fairness: events (avg/stddev): 12591.8750/200.91 execution time (avg/stddev): 60.0108/0.01


- 并发度:1024

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_index --time=60 --tables=10 --table-size=10000 --threads=1024 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1024 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1024 tps: 124154.54 qps: 124154.54 (r/w/o: 0.00/9435.19/114719.35) lat (ms,95%): 30.26 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1024 tps: 123363.44 qps: 123363.24 (r/w/o: 0.00/9529.97/113833.27) lat (ms,95%): 30.26 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1024 tps: 115883.96 qps: 115884.16 (r/w/o: 0.00/8886.04/106998.12) lat (ms,95%): 30.26 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1024 tps: 113666.60 qps: 113666.60 (r/w/o: 0.00/8771.36/104895.24) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1024 tps: 108837.97 qps: 108837.97 (r/w/o: 0.00/8329.64/100508.32) lat (ms,95%): 31.37 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 1024 tps: 112968.27 qps: 112968.27 (r/w/o: 0.00/8587.33/104380.93) lat (ms,95%): 27.66 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 536093 other: 6454774 total: 6990867 transactions: 6990867 (110693.87 per sec.) queries: 6990867 (110693.87 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 63.1526s total number of events: 6990867

Latency (ms): min: 0.62 avg: 8.79 max: 3601.46 95th percentile: 29.72 sum: 61479208.45

Threads fairness: events (avg/stddev): 6827.0186/113.77 execution time (avg/stddev): 60.0383/0.15


3. Update index(no-primary、no-key)场景测试

- 准备数据与预热

// 导入前设置为乐观事务模式 mysql> set global tidb_disable_txn_auto_retry=off; mysql> set global tidb_txn_mode="optimistic";

// 使用 sysbench 工具生成数据 // oltp_update_non_index

sysbench --config-file=config oltp_update_non_index --tables=10 --table-size=10000 prepare

// 导入结束后再设置回悲观模式 mysql> set global tidb_disable_txn_auto_retry=on; mysql> set global tidb_txn_mode="pessimistic";

// 数据预热与统计信息收集 SELECT COUNT(pad) FROM sbtest1 USE INDEX(k_1); ...... SELECT COUNT(pad) FROM sbtest10 USE INDEX(k_1);

ANALYZE TABLE sbtest1; ...... ANALYZE TABLE sbtest10;


- 并发度:1

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=1 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1 tps: 1625.07 qps: 1625.07 (r/w/o: 0.00/127.57/1497.50) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1 tps: 1641.75 qps: 1641.75 (r/w/o: 0.00/121.00/1520.75) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1 tps: 1632.10 qps: 1632.10 (r/w/o: 0.00/126.70/1505.40) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1 tps: 1658.00 qps: 1658.00 (r/w/o: 0.00/125.40/1532.60) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1 tps: 1651.80 qps: 1651.80 (r/w/o: 0.00/125.30/1526.50) lat (ms,95%): 2.22 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 7517 other: 91169 total: 98686 transactions: 98686 (1644.63 per sec.) queries: 98686 (1644.63 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0028s total number of events: 98686

Latency (ms): min: 0.39 avg: 0.61 max: 19.86 95th percentile: 2.22 sum: 59973.80

Threads fairness: events (avg/stddev): 98686.0000/0.00 execution time (avg/stddev): 59.9738/0.00


- 并发度:8

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=8 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 8 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 8 tps: 10161.16 qps: 10161.16 (r/w/o: 0.00/786.59/9374.58) lat (ms,95%): 3.25 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 8 tps: 10311.22 qps: 10311.22 (r/w/o: 0.00/792.42/9518.80) lat (ms,95%): 3.19 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 8 tps: 10410.11 qps: 10410.11 (r/w/o: 0.00/786.30/9623.81) lat (ms,95%): 3.19 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 8 tps: 10338.69 qps: 10338.69 (r/w/o: 0.00/788.20/9550.49) lat (ms,95%): 3.19 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 8 tps: 10361.31 qps: 10361.31 (r/w/o: 0.00/797.40/9563.91) lat (ms,95%): 3.19 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 8 tps: 10434.38 qps: 10434.38 (r/w/o: 0.00/790.10/9644.28) lat (ms,95%): 3.19 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 47415 other: 572783 total: 620198 transactions: 620198 (10335.66 per sec.) queries: 620198 (10335.66 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0034s total number of events: 620198

Latency (ms): min: 0.35 avg: 0.77 max: 174.09 95th percentile: 3.19 sum: 479823.47

Threads fairness: events (avg/stddev): 77524.7500/313.81 execution time (avg/stddev): 59.9779/0.00


- 并发度:16

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=16 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 16 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 16 tps: 17958.90 qps: 17958.90 (r/w/o: 0.00/1380.35/16578.55) lat (ms,95%): 3.68 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 16 tps: 17845.79 qps: 17845.79 (r/w/o: 0.00/1372.42/16473.37) lat (ms,95%): 3.68 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 16 tps: 17936.70 qps: 17936.70 (r/w/o: 0.00/1374.80/16561.90) lat (ms,95%): 3.68 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 16 tps: 18019.57 qps: 18019.57 (r/w/o: 0.00/1393.10/16626.48) lat (ms,95%): 3.75 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 16 tps: 18241.63 qps: 18241.63 (r/w/o: 0.00/1401.60/16840.03) lat (ms,95%): 3.68 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 16 tps: 17772.03 qps: 17772.03 (r/w/o: 0.00/1360.69/16411.33) lat (ms,95%): 3.68 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 82839 other: 994967 total: 1077806 transactions: 1077806 (17960.90 per sec.) queries: 1077806 (17960.90 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0062s total number of events: 1077806

Latency (ms): min: 0.36 avg: 0.89 max: 205.31 95th percentile: 3.68 sum: 959747.16

Threads fairness: events (avg/stddev): 67362.8750/273.73 execution time (avg/stddev): 59.9842/0.00


- 并发度:32

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=32 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 32 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 32 tps: 30736.44 qps: 30736.44 (r/w/o: 0.00/2359.19/28377.25) lat (ms,95%): 4.25 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 32 tps: 30333.09 qps: 30333.09 (r/w/o: 0.00/2335.93/27997.16) lat (ms,95%): 4.33 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 32 tps: 30195.72 qps: 30195.72 (r/w/o: 0.00/2332.98/27862.74) lat (ms,95%): 4.41 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 32 tps: 30872.46 qps: 30872.46 (r/w/o: 0.00/2363.70/28508.76) lat (ms,95%): 4.33 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 32 tps: 31329.05 qps: 31329.05 (r/w/o: 0.00/2401.40/28927.65) lat (ms,95%): 4.33 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 32 tps: 31484.88 qps: 31484.88 (r/w/o: 0.00/2406.10/29078.78) lat (ms,95%): 4.25 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 142008 other: 1707607 total: 1849615 transactions: 1849615 (30823.17 per sec.) queries: 1849615 (30823.17 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0051s total number of events: 1849615

Latency (ms): min: 0.37 avg: 1.04 max: 204.08 95th percentile: 4.33 sum: 1919444.15

Threads fairness: events (avg/stddev): 57800.4688/300.39 execution time (avg/stddev): 59.9826/0.00


- 并发度:64

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=64 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 64 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 64 tps: 48867.75 qps: 48867.75 (r/w/o: 0.00/3756.59/45111.16) lat (ms,95%): 5.28 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 64 tps: 49198.40 qps: 49198.40 (r/w/o: 0.00/3790.63/45407.77) lat (ms,95%): 5.28 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 64 tps: 49356.97 qps: 49356.97 (r/w/o: 0.00/3777.97/45579.00) lat (ms,95%): 5.37 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 64 tps: 47521.97 qps: 47521.97 (r/w/o: 0.00/3638.94/43883.04) lat (ms,95%): 5.37 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 64 tps: 48292.67 qps: 48292.67 (r/w/o: 0.00/3721.07/44571.61) lat (ms,95%): 5.37 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 64 tps: 50330.84 qps: 50330.84 (r/w/o: 0.00/3878.09/46452.75) lat (ms,95%): 5.09 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 225670 other: 2710294 total: 2935964 transactions: 2935964 (48912.60 per sec.) queries: 2935964 (48912.60 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0224s total number of events: 2935964

Latency (ms): min: 0.37 avg: 1.31 max: 285.86 95th percentile: 5.28 sum: 3839110.51

Threads fairness: events (avg/stddev): 45874.4375/260.94 execution time (avg/stddev): 59.9861/0.00


- 并发度:128

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=128 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 128 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 128 tps: 70478.94 qps: 70478.94 (r/w/o: 0.00/5367.83/65111.11) lat (ms,95%): 7.56 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 128 tps: 67395.08 qps: 67395.08 (r/w/o: 0.00/5198.21/62196.87) lat (ms,95%): 7.70 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 128 tps: 67285.07 qps: 67285.07 (r/w/o: 0.00/5137.80/62147.27) lat (ms,95%): 7.70 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 128 tps: 68581.12 qps: 68581.12 (r/w/o: 0.00/5235.80/63345.32) lat (ms,95%): 7.70 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 128 tps: 70525.92 qps: 70525.92 (r/w/o: 0.00/5416.10/65109.81) lat (ms,95%): 7.30 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 128 tps: 70618.49 qps: 70618.49 (r/w/o: 0.00/5397.96/65220.53) lat (ms,95%): 7.30 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 317590 other: 3831576 total: 4149166 transactions: 4149166 (69139.18 per sec.) queries: 4149166 (69139.18 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0095s total number of events: 4149166

Latency (ms): min: 0.38 avg: 1.85 max: 377.15 95th percentile: 7.56 sum: 7678619.41

Threads fairness: events (avg/stddev): 32415.3594/274.75 execution time (avg/stddev): 59.9892/0.00


- 并发度:256

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=256 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 256 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 256 tps: 87955.19 qps: 87955.19 (r/w/o: 0.00/6729.73/81225.46) lat (ms,95%): 9.73 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 256 tps: 96628.06 qps: 96628.06 (r/w/o: 0.00/7407.02/89221.04) lat (ms,95%): 9.56 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 256 tps: 95062.89 qps: 95062.89 (r/w/o: 0.00/7270.08/87792.82) lat (ms,95%): 9.73 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 256 tps: 94046.04 qps: 94046.04 (r/w/o: 0.00/7194.41/86851.63) lat (ms,95%): 9.56 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 256 tps: 93017.80 qps: 93017.80 (r/w/o: 0.00/7122.09/85895.71) lat (ms,95%): 10.27 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 256 tps: 93112.56 qps: 93112.56 (r/w/o: 0.00/7092.97/86019.59) lat (ms,95%): 10.46 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 428257 other: 5170527 total: 5598784 transactions: 5598784 (93271.57 per sec.) queries: 5598784 (93271.57 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.0244s total number of events: 5598784

Latency (ms): min: 0.41 avg: 2.74 max: 472.21 95th percentile: 9.91 sum: 15359682.43

Threads fairness: events (avg/stddev): 21870.2500/254.24 execution time (avg/stddev): 59.9988/0.01


- 并发度:512

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=512 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 512 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 512 tps: 123330.73 qps: 123330.73 (r/w/o: 0.00/9443.01/113887.73) lat (ms,95%): 14.21 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 512 tps: 114401.02 qps: 114401.02 (r/w/o: 0.00/8766.02/105635.00) lat (ms,95%): 15.83 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 512 tps: 113775.16 qps: 113775.16 (r/w/o: 0.00/8666.30/105108.86) lat (ms,95%): 14.73 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 512 tps: 113804.98 qps: 113804.98 (r/w/o: 0.00/8701.90/105103.08) lat (ms,95%): 14.21 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 512 tps: 112099.29 qps: 112099.19 (r/w/o: 0.00/8601.19/103498.00) lat (ms,95%): 13.95 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 512 tps: 111256.23 qps: 111256.33 (r/w/o: 0.00/8513.00/102743.33) lat (ms,95%): 13.70 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 527106 other: 6360786 total: 6887892 transactions: 6887892 (114541.03 per sec.) queries: 6887892 (114541.03 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.1324s total number of events: 6887892

Latency (ms): min: 0.42 avg: 4.46 max: 549.31 95th percentile: 14.46 sum: 30726510.75

Threads fairness: events (avg/stddev): 13452.9141/147.46 execution time (avg/stddev): 60.0127/0.02


- 并发度:1024

删除 sysbench 库并重复准备数据与预热步骤

sysbench --config-file=config oltp_update_non_index --time=60 --tables=10 --table-size=10000 --threads=1024 run

sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options: Number of threads: 1024 Report intermediate results every 10 second(s) Initializing random number generator from current time

Initializing worker threads...

Threads started!

[ 10s ] thds: 1024 tps: 110784.90 qps: 110784.80 (r/w/o: 0.00/8463.96/102320.85) lat (ms,95%): 30.81 err/s: 0.00 reconn/s: 0.00 [ 20s ] thds: 1024 tps: 109123.75 qps: 109123.85 (r/w/o: 0.00/8322.68/100801.17) lat (ms,95%): 31.94 err/s: 0.00 reconn/s: 0.00 [ 30s ] thds: 1024 tps: 106744.77 qps: 106744.67 (r/w/o: 0.00/8183.87/98560.81) lat (ms,95%): 31.94 err/s: 0.00 reconn/s: 0.00 [ 40s ] thds: 1024 tps: 107987.95 qps: 107988.05 (r/w/o: 0.00/8220.79/99767.26) lat (ms,95%): 30.26 err/s: 0.00 reconn/s: 0.00 [ 50s ] thds: 1024 tps: 110048.73 qps: 110048.63 (r/w/o: 0.00/8452.61/101596.02) lat (ms,95%): 24.83 err/s: 0.00 reconn/s: 0.00 [ 60s ] thds: 1024 tps: 110101.85 qps: 110101.65 (r/w/o: 0.00/8448.46/101653.19) lat (ms,95%): 23.10 err/s: 0.00 reconn/s: 0.00 SQL statistics: queries performed: read: 0 write: 501246 other: 6048782 total: 6550028 transactions: 6550028 (108652.73 per sec.) queries: 6550028 (108652.73 per sec.) ignored errors: 0 (0.00 per sec.) reconnects: 0 (0.00 per sec.)

General statistics: total time: 60.2818s total number of events: 6550028

Latency (ms): min: 0.59 avg: 9.38 max: 548.50 95th percentile: 29.19 sum: 61455837.91

Threads fairness: events (avg/stddev): 6396.5117/78.66 execution time (avg/stddev): 60.0155/0.03

xiaodong-ji commented 4 years ago

报告连接:https://docs.google.com/spreadsheets/d/1Q2_2Na6Qrn17r8l_Fl90RJ1Ub0yF-N7MU7cbRvAJ1xw/edit?usp=sharing