sysbench读写压测报错

【 使用环境 】测试环境
【 OB】
【 使用版本 】4.0
【问题描述】sysbench 运行oltp_read_only用例不会报错,然而运行oltp_read_write报错了。

[root@CentOS76_VM sysbench_test]# sysbench --config-file=sysbench_config_obproxy oltp_read_only --tables=10 --table-size=1000000 run
sysbench 1.0.14 (using bundled LuaJIT 2.1.0-beta2)

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


Initializing worker threads...

Threads started!

[ 1s ] thds: 10 tps: 418.91 qps: 6797.26 (r/w/o: 5949.47/0.00/847.79) lat (ms,95%): 47.47 err/s: 0.00 reconn/s: 0.00
[ 2s ] thds: 10 tps: 500.08 qps: 7994.25 (r/w/o: 6994.09/0.00/1000.16) lat (ms,95%): 33.12 err/s: 0.00 reconn/s: 0.00
[ 3s ] thds: 10 tps: 536.13 qps: 8577.05 (r/w/o: 7505.80/0.00/1071.26) lat (ms,95%): 29.19 err/s: 0.00 reconn/s: 0.00
[ 4s ] thds: 10 tps: 547.06 qps: 8765.90 (r/w/o: 7670.79/0.00/1095.11) lat (ms,95%): 29.19 err/s: 0.00 reconn/s: 0.00
[ 5s ] thds: 10 tps: 540.98 qps: 8631.62 (r/w/o: 7549.67/0.00/1081.95) lat (ms,95%): 28.67 err/s: 0.00 reconn/s: 0.00
[ 6s ] thds: 10 tps: 556.82 qps: 8931.04 (r/w/o: 7817.41/0.00/1113.63) lat (ms,95%): 29.72 err/s: 0.00 reconn/s: 0.00
[ 7s ] thds: 10 tps: 550.00 qps: 8795.03 (r/w/o: 7695.03/0.00/1100.00) lat (ms,95%): 31.94 err/s: 0.00 reconn/s: 0.00
[ 8s ] thds: 10 tps: 535.02 qps: 8553.28 (r/w/o: 7483.25/0.00/1070.04) lat (ms,95%): 30.26 err/s: 0.00 reconn/s: 0.00
[ 9s ] thds: 10 tps: 567.95 qps: 9102.21 (r/w/o: 7966.31/0.00/1135.90) lat (ms,95%): 29.19 err/s: 0.00 reconn/s: 0.00
^C
[root@CentOS76_VM sysbench_test]# sysbench --config-file=sysbench_config_obproxy oltp_read_write --tables=10 --table-size=1000000 run
sysbench 1.0.14 (using bundled LuaJIT 2.1.0-beta2)

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


Initializing worker threads...

Threads started!

FATAL: mysql_stmt_execute() returned error 2013 (Lost connection to MySQL server during query) for query 'SELECT c FROM sbtest1 WHERE id BETWEEN ? AND ?'
FATAL: `thread_run' function failed: /usr/local/share/sysbench/oltp_common.lua:432: SQL error, errno = 2013, state = 'HY000': Lost connection to MySQL server during query

是通过obproxy连接做的测试,还是直连observer做的测试,可以分别看下obproxy和observer的日志

是通过obproxy连接的

可以看下obproxy的日志,或者通过直连observer试下

obproxy.log (82.5 KB)

我开会话直连obproxy或者observer,没问题

obproxy配置是什么样的,我是说也可以通过直连observer进行sysbench压测。

obproxy-ce:
  # Set dependent components for the component.
  # When the associated configurations are not done, OBD will automatically get the these configurations from the dependent components.
  depends:
  - oceanbase-ce
  servers:
  - 172.16.11.134
  - 172.16.5.145
  global:
    listen_port: 2883 # External port. The default value is 2883.
    prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
    home_path: /home/obproxy
    # oceanbase root server list
    # format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
    # rs_list: 192.168.1.2:2881;192.168.1.3:2881;192.168.1.4:2881
    enable_cluster_checkout: false
    # observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
    # cluster_name: obcluster
    skip_proxy_sys_private_check: true
    enable_strict_kernel_release: false
    # obproxy_sys_password: # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
    # observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
  172.16.11.134:
    enable_cluster_checkout: false
  172.16.5.145:
    enable_cluster_checkout: false

rpm -qa | grep obclient看下obclient版本,升级到2.2.1以上试试。

没有输出哦

https://www.oceanbase.com/docs/community-observer-cn-10000000000901379#手动进行%20Sysbench%20测试 按照文档升级下sysbench到1.0.20试试呢