关于mysql的压测sysbench

测试表格:
CREATE TABLE `sbtest` ( `id` int(10) unsigned NOT NULL auto_increment, `k` int(10) unsigned NOT NULL default '0', `c` char(120) NOT NULL default '', `pad` char(60) NOT NULL default '', PRIMARY KEY (`id`), KEY `k` (`k`));

sysbench --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp-table-size=800000 --oltp-read-only=off --init-rng=on --num-threads=16 --max-requests=0 --oltp-dist-type=uniform --max-time=3600 --report-interval=10 --mysql-user=xxxxx --mysql-password='xxxxx' --db-driver=mysql --mysql-host=xxxxxx --mysql-db=test run > /tmp/result-12-16.log

sysbench --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp-table-size=10000000 --oltp-read-only=off --init-rng=on --num-threads=256 --max-requests=0 --oltp-dist-type=uniform --max-time=100 --report-interval=10 --mysql-user=root --mysql-password='123456' --db-driver=mysql --mysql-host=xxxxx --mysql-db=xxx --mysql-port=xxxx run

原文地址:https://www.cnblogs.com/kuku0223/p/8046870.html