File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 8181- 做不同的类型测试之前,最好都重启下 MySQL
8282- 创建一个数据库,名字为:` sbtest `
8383- select 测试:
84- - 准备测试数据:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 prepare`
85- - 开始测试:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 run`
86- - 清除测试数据:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 cleanup`
84+ - 准备测试数据:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 prepare`
85+ - 开始测试:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 run`
86+ - 清除测试数据:`sysbench /usr/local/share/sysbench/oltp_point_select.lua --threads=15 --report-interval=10 --time=120 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 cleanup`
8787- 读写测试:
8888 - 读写测试我开了线程比较多,也修改了 oltp_common.lua 内容,有可能会报:`MySQL error: 1461 "Can't create more than max_prepared_stmt_count statements`,那你需要在 MySQL 中执行这句临时设置 SQL:`SET GLOBAL max_prepared_stmt_count=100000;`
89- - 准备测试数据:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 prepare`
90- - 开始测试:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 run`
91- - 清除测试数据:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456... --mysql-host=127.0.0.1 --mysql-port=3306 cleanup`
89+ - 准备测试数据:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 prepare`
90+ - 开始测试:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 run`
91+ - 清除测试数据:`sysbench /usr/local/share/sysbench/oltp_read_write.lua --threads=100 --report-interval=10 --time=100 --mysql-user=root --mysql-password=123456 --mysql-host=127.0.0.1 --mysql-port=3306 cleanup`
9292
9393- 参数说明:
9494 - `--threads=15` 表示发起 15 个并发连接
You can’t perform that action at this time.
0 commit comments