用sysbench测试性能,连接mycat执行语句如下:
prepare:
/usr/local/sysbench/bin/sysbench --test=oltp --mysql-host=10.20.100.10 --mysql-port=3306 --mysql-user=testmsql --mysql-password=testmsql --mysql-db=test --oltp-num-tables=10 --oltp-table-size=100000 prepare
run:
(1)、/usr/local/sysbench/bin/sysbench --test=oltp --mysql-host=10.20.100.10 --mysql-port=3306 --mysql-user=testmsql --mysql-password=testmsql --mysql-db=test --oltp-num-tables=10 --oltp-table-size=100000 --oltp-test-mode=complex --oltp-read-only=on --num-threads=1000 --max-requests=0 --max-time=120 --report-interval=10 run
(2)、/usr/local/sysbench/bin/sysbench --test=oltp --mysql-host=10.20.100.10 --mysql-port=3306 --mysql-user=testmsql --mysql-password=testmsql --mysql-db=test --oltp-num-tables=10 --oltp-table-size=100000 --oltp-test-mode=complex --db-ps-mode=disable --oltp-read-only=on --num-threads=1000 --max-requests=0 --max-time=120 --report-interval=10 run
clean:
/usr/local/sysbench/bin/sysbench --test=oltp --mysql-host=10.20.100.10 --mysql-port=3306 --mysql-user=testmsql --mysql-password=testmsql --mysql-db=test --oltp-num-tables=10 cleanup
在run的时候,使用(1)在mycat上执行会报错:
Threads started!
ALERT: failed to execute mysql_stmt_execute(): Err2013 Lost connection to MySQL server during query
FATAL: database error, exiting...
FATAL: Runner thread execute query failed (2)!
FATAL: Runner thread 2 failed with error 1
在使用(2) run的话不会报错,(1)和(2)的差别仅仅在设置了参数--db-ps-mode=disable
而且、执行(1)在直接连上mysql服务器不会报错。按道理说 --db-ps-mode仅仅只是数据数据编排报表模型,应该不影响执行才对,为什么会出现这个问题,应该怎么解决呢?
相似问题