oceanbase tpcc压测疑惑

ob:4.1.0
mysql:5.6
warehouse:100

mysql压测:

(none)> show global variables like 'innodb_buffer_pool_size%';
+-------------------------+------------+
| Variable_name           | Value      |
+-------------------------+------------+
| innodb_buffer_pool_size | 1073741824 |
+-------------------------+------------+
1 row in set (0.00 sec)
./tpcc_start xxxx  -P3306 -w100 -c48 -r10 -l 120
MEASURING START.

  10, trx: 2863, 95%: 208.744, 99%: 295.934, max_rt: 2103.027, 2872|294.771, 286|93.670, 288|758.221, 286|1306.430
  20, trx: 2781, 95%: 185.410, 99%: 286.263, max_rt: 392.067, 2783|320.637, 279|105.144, 278|468.514, 278|934.471
  30, trx: 2583, 95%: 195.206, 99%: 252.368, max_rt: 425.073, 2584|177.011, 257|90.889, 258|447.640, 258|800.534
  40, trx: 2658, 95%: 201.680, 99%: 278.653, max_rt: 384.479, 2651|242.405, 266|83.413, 266|445.285, 264|916.811
  50, trx: 2679, 95%: 207.001, 99%: 276.824, max_rt: 468.081, 2684|290.957, 268|93.833, 268|574.986, 267|1021.369
  60, trx: 2710, 95%: 193.345, 99%: 297.622, max_rt: 500.514, 2708|294.733, 271|92.600, 272|675.328, 275|986.029
  70, trx: 2582, 95%: 205.151, 99%: 271.897, max_rt: 446.858, 2579|330.165, 258|95.647, 258|644.341, 256|1014.582
  80, trx: 2640, 95%: 193.983, 99%: 297.978, max_rt: 489.466, 2644|288.207, 264|79.427, 264|588.204, 266|1231.723
  90, trx: 2611, 95%: 206.939, 99%: 278.737, max_rt: 379.707, 2614|241.964, 262|89.475, 260|530.705, 261|1186.334
 100, trx: 2626, 95%: 198.031, 99%: 269.708, max_rt: 413.987, 2628|257.202, 263|84.753, 264|481.806, 262|942.889
 110, trx: 2441, 95%: 217.027, 99%: 299.499, max_rt: 386.007, 2438|345.757, 243|79.223, 244|576.102, 243|989.645
 120, trx: 2725, 95%: 200.777, 99%: 287.379, max_rt: 395.406, 2717|390.521, 273|114.450, 272|490.634, 273|986.225

STOPPING THREADS................................................

<Raw Results>
  [0] sc:2 lt:31897  rt:0  fl:0 avg_rt: 97.3 (5)
  [1] sc:9362 lt:22541  rt:0  fl:0 avg_rt: 25.1 (5)
  [2] sc:990 lt:2200  rt:0  fl:0 avg_rt: 16.5 (5)
  [3] sc:342 lt:2850  rt:0  fl:0 avg_rt: 185.7 (80)
  [4] sc:0 lt:3189  rt:0  fl:0 avg_rt: 530.8 (20)
 in 120 sec.

<Raw Results2(sum ver.)>
  [0] sc:2  lt:31897  rt:0  fl:0 
  [1] sc:9362  lt:22543  rt:0  fl:0 
  [2] sc:990  lt:2200  rt:0  fl:0 
  [3] sc:342  lt:2850  rt:0  fl:0 
  [4] sc:0  lt:3189  rt:0  fl:0 

<Constraint Check> (all must be [OK])
 [transaction percentage]
        Payment: 43.48% (>=43.0%) [OK]
   Order-Status: 4.35% (>= 4.0%) [OK]
       Delivery: 4.35% (>= 4.0%) [OK]
    Stock-Level: 4.35% (>= 4.0%) [OK]
 [response time (at least 90% passed)]
      New-Order: 0.01%  [NG] *
        Payment: 29.35%  [NG] *
   Order-Status: 31.03%  [NG] *
       Delivery: 10.71%  [NG] *
    Stock-Level: 0.00%  [NG] *

<TpmC>
                 15949.500 TpmC

oceanbase压测:

obclient [(none)]> select * from oceanbase.__all_unit_config where name='yl_unit';
+----------------------------+----------------------------+----------------+---------+---------+---------+-------------+---------------+----------+----------+-------------+
| gmt_create                 | gmt_modified               | unit_config_id | name    | max_cpu | min_cpu | memory_size | log_disk_size | max_iops | min_iops | iops_weight |
+----------------------------+----------------------------+----------------+---------+---------+---------+-------------+---------------+----------+----------+-------------+
| 2023-09-26 11:02:53.671185 | 2023-09-26 11:02:53.671185 |           1002 | yl_unit |      24 |       1 | 68719476736 |   85899345920 |    20000 |    20000 |           1 |
+----------------------------+----------------------------+----------------+---------+---------+---------+-------------+---------------+----------+----------+-------------+



obclient [(none)]> select * from oceanbase.__all_resource_pool where name='yl_pool_01';
+----------------------------+----------------------------+------------------+------------+------------+----------------+-------------------+-----------+--------------+--------------------+
| gmt_create                 | gmt_modified               | resource_pool_id | name       | unit_count | unit_config_id | zone_list         | tenant_id | replica_type | is_tenant_sys_pool |
+----------------------------+----------------------------+------------------+------------+------------+----------------+-------------------+-----------+--------------+--------------------+
| 2023-09-26 11:02:58.592091 | 2023-09-26 11:03:36.687930 |             1002 | yl_pool_01 |          1 |           1002 | zone1;zone2;zone3 |      1002 |            0 |                  0 |
+----------------------------+----------------------------+------------------+------------+------------+----------------+-------------------+-----------+--------------+--------------------+
这是用户的unit和pool设置

./tpcc_start xxxx  -P2883 -w100 -c48 -r10 -l 120

MEASURING START.

  10, trx: 985, 95%: 360.683, 99%: 397.536, max_rt: 641.330, 978|384.889, 98|57.621, 98|564.548, 99|2266.279
  20, trx: 1127, 95%: 316.836, 99%: 370.865, max_rt: 457.982, 1129|312.020, 113|33.499, 112|548.081, 116|2002.579
  30, trx: 1223, 95%: 275.749, 99%: 313.065, max_rt: 447.635, 1220|254.433, 122|34.336, 123|425.791, 118|1518.962
  40, trx: 1220, 95%: 279.740, 99%: 428.811, max_rt: 631.111, 1220|290.788, 122|110.781, 121|710.453, 123|1492.274
  50, trx: 1248, 95%: 273.366, 99%: 313.440, max_rt: 416.333, 1242|333.772, 124|36.240, 125|481.125, 125|1533.843
  60, trx: 1431, 95%: 229.865, 99%: 282.094, max_rt: 339.798, 1438|403.953, 144|26.020, 144|426.137, 144|1202.554
  70, trx: 1320, 95%: 267.137, 99%: 346.605, max_rt: 436.890, 1321|361.217, 132|32.320, 132|627.433, 133|1346.271
  80, trx: 1527, 95%: 221.556, 99%: 248.098, max_rt: 320.024, 1523|231.490, 153|24.043, 152|397.663, 155|1161.655
  90, trx: 1512, 95%: 224.897, 99%: 294.344, max_rt: 357.221, 1513|261.444, 151|39.582, 151|678.656, 149|1087.160
 100, trx: 1516, 95%: 230.762, 99%: 281.420, max_rt: 370.467, 1515|194.146, 152|33.569, 152|507.072, 151|1150.856
 110, trx: 1632, 95%: 206.877, 99%: 257.866, max_rt: 363.548, 1629|248.222, 162|24.572, 163|415.751, 164|991.978
 120, trx: 1564, 95%: 227.674, 99%: 278.487, max_rt: 552.872, 1565|294.689, 157|26.618, 157|578.771, 157|1082.379

STOPPING THREADS................................................

<Raw Results>
  [0] sc:0 lt:16305  rt:0  fl:0 avg_rt: 183.7 (5)
  [1] sc:0 lt:16293  rt:0  fl:0 avg_rt: 46.8 (5)
  [2] sc:3 lt:1627  rt:0  fl:0 avg_rt: 18.1 (5)
  [3] sc:0 lt:1630  rt:0  fl:0 avg_rt: 381.4 (80)
  [4] sc:0 lt:1634  rt:0  fl:0 avg_rt: 1116.5 (20)
 in 120 sec.

<Raw Results2(sum ver.)>
  [0] sc:0  lt:16308  rt:0  fl:0 
  [1] sc:0  lt:16309  rt:0  fl:0 
  [2] sc:3  lt:1627  rt:0  fl:0 
  [3] sc:0  lt:1630  rt:0  fl:0 
  [4] sc:0  lt:1634  rt:0  fl:0 

<Constraint Check> (all must be [OK])
 [transaction percentage]
        Payment: 43.46% (>=43.0%) [OK]
   Order-Status: 4.35% (>= 4.0%) [OK]
       Delivery: 4.35% (>= 4.0%) [OK]
    Stock-Level: 4.36% (>= 4.0%) [OK]
 [response time (at least 90% passed)]
      New-Order: 0.00%  [NG] *
        Payment: 0.00%  [NG] *
   Order-Status: 0.18%  [NG] *
       Delivery: 0.00%  [NG] *
    Stock-Level: 0.00%  [NG] *

<TpmC>
                 8152.500 TpmC

问题:为什么压测结果相差这么大?obd部署的,基本都是默认参数,哪个姿势不对?

官网有tpcc测试教程文档,调哪些参数,都有罗列。

默认参数就是测试使用,跑性能肯定有针对性的优化。

上生产也不可能默认参数上,肯定是和对应业务模型适配,压测,找到对应业务适配的合适的参数才行。

https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000033307

即便按指引进行环境优化,提升了20%多,但是很不理想.

MEASURING START.

  10, trx: 1621, 95%: 209.056, 99%: 251.689, max_rt: 386.095, 1625|290.436, 163|29.880, 163|408.392, 161|1245.218
  20, trx: 1671, 95%: 201.680, 99%: 232.913, max_rt: 321.273, 1667|250.983, 167|23.425, 167|374.159, 167|1018.839
  30, trx: 1707, 95%: 196.202, 99%: 229.590, max_rt: 383.396, 1707|201.062, 170|22.524, 171|377.664, 173|981.667
  40, trx: 1781, 95%: 191.731, 99%: 218.330, max_rt: 525.509, 1777|202.551, 179|21.747, 177|343.122, 176|968.300
  50, trx: 1687, 95%: 200.176, 99%: 221.357, max_rt: 325.466, 1685|236.213, 169|20.079, 169|365.588, 170|1024.676
  60, trx: 1775, 95%: 190.530, 99%: 230.003, max_rt: 340.230, 1770|384.671, 176|22.455, 177|400.423, 177|857.967
  70, trx: 1793, 95%: 184.856, 99%: 206.692, max_rt: 343.207, 1799|330.258, 180|23.468, 181|346.253, 180|927.078
  80, trx: 1842, 95%: 182.437, 99%: 221.092, max_rt: 329.083, 1841|204.991, 184|19.808, 183|359.010, 183|850.429
  90, trx: 1841, 95%: 183.532, 99%: 210.879, max_rt: 417.010, 1838|264.855, 184|23.518, 185|348.873, 186|868.427
 100, trx: 1828, 95%: 185.133, 99%: 209.244, max_rt: 288.343, 1828|291.246, 184|24.114, 182|344.767, 182|880.881
 110, trx: 1846, 95%: 183.697, 99%: 223.621, max_rt: 320.958, 1843|198.744, 184|21.017, 185|363.964, 185|879.234
 120, trx: 1862, 95%: 179.243, 99%: 213.100, max_rt: 320.274, 1856|266.111, 186|19.543, 186|367.115, 187|850.281
 130, trx: 1913, 95%: 176.053, 99%: 204.721, max_rt: 309.278, 1906|228.040, 192|20.887, 191|329.158, 190|824.662
 140, trx: 1926, 95%: 176.053, 99%: 215.861, max_rt: 334.762, 1929|286.274, 193|19.338, 192|368.261, 194|802.340
 150, trx: 1881, 95%: 180.860, 99%: 210.060, max_rt: 308.238, 1874|209.033, 188|20.292, 189|319.885, 188|844.847
 160, trx: 1817, 95%: 185.299, 99%: 218.919, max_rt: 436.192, 1816|221.014, 181|19.616, 181|372.669, 181|925.214
 170, trx: 1906, 95%: 174.949, 99%: 203.682, max_rt: 308.212, 1901|229.127, 191|27.392, 192|336.574, 189|795.972
 180, trx: 1888, 95%: 177.375, 99%: 211.068, max_rt: 358.904, 1882|188.023, 188|20.105, 188|333.425, 190|873.411
 190, trx: 1897, 95%: 183.807, 99%: 216.378, max_rt: 318.925, 1901|272.575, 190|22.583, 190|341.266, 190|871.545
 200, trx: 1936, 95%: 173.645, 99%: 203.073, max_rt: 282.928, 1935|217.090, 194|19.484, 194|319.955, 193|863.318