sysbench壓測實踐
軟體地址:
Redhat/CentOS採用如下方式安裝:
-
curl -s | sudo bash sudo yum -y install sysbench
sysbench --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.177.130 --mysql-port=3306 --mysql-db=testdb \
--mysql-user='root' --mysql-password='123456' --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=500000 \
--oltp-tables-count=8 --num-threads=4 --max-time=1800 --max-requests=0 --report-interval=1 prepare
需要先做prepare, 否則會提示表不存在的錯誤
另外,mysql 8密碼認證方式相比5.7有所變化,需要修改使用者預設的密碼認證方式
ALTER USER 'root'@'%' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER; #修改加密規則
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; #更新一下使用者的密碼
[root@server2 ~]# sysbench --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.177.130 --mysql-port=3306 --mysql-db=testdb \
> --mysql-user='root' --mysql-password='123456' --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=500000 \
> --oltp-tables-count=8 --num-threads=4 --max-time=1800 --max-requests=0 --report-interval=1 prepare
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
Creating table 'sbtest1'...
Inserting 500000 records into 'sbtest1'
Creating secondary indexes on 'sbtest1'...
Creating table 'sbtest2'...
Inserting 500000 records into 'sbtest2'
Creating secondary indexes on 'sbtest2'...
Creating table 'sbtest3'...
Inserting 500000 records into 'sbtest3'
Creating secondary indexes on 'sbtest3'...
Creating table 'sbtest4'...
Inserting 500000 records into 'sbtest4'
Creating secondary indexes on 'sbtest4'...
Creating table 'sbtest5'...
Inserting 500000 records into 'sbtest5'
Creating secondary indexes on 'sbtest5'...
Creating table 'sbtest6'...
Inserting 500000 records into 'sbtest6'
Creating secondary indexes on 'sbtest6'...
Creating table 'sbtest7'...
Inserting 500000 records into 'sbtest7'
Creating secondary indexes on 'sbtest7'...
Creating table 'sbtest8'...
Inserting 500000 records into 'sbtest8'
接下來壓測:
sysbench --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.177.130 --mysql-port=3306 --mysql-db=testdb \
--mysql-user='root' --mysql-password='123456' --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=500000 \
--oltp-tables-count=8 --num-threads=4 --max-time=1800 --max-requests=0 --report-interval=1 run
root@server2 ~]# sysbench --test=oltp --db-driver=mysql --mysql-table-engine=innodb --mysql-host=192.168.177.130 --mysql-port=3306 --mysql-db=testdb --mysql-user='root' --mysql-password='123456' --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=500000 --oltp-tables-count=8 --num-threads=4 --max-time=1800 --max-requests=0 --report-interval=1 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
WARNING: --max-time is deprecated, use --time instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)
Running the test with following options:
Number of threads: 4
Report intermediate results every 1 second(s)
Initializing random number generator from current time
Initializing worker threads...
Threads started!
[ 1s ] thds: 4 tps: 17.07 qps: 395.50 (r/w/o: 283.58/73.98/37.94) lat (ms,95%): 350.33 err/s: 0.00 reconn/s: 0.00
[ 2s ] thds: 4 tps: 25.89 qps: 526.10 (r/w/o: 367.65/106.67/51.78) lat (ms,95%): 314.45 err/s: 0.00 reconn/s: 0.00
[ 3s ] thds: 4 tps: 40.30 qps: 798.40 (r/w/o: 561.38/156.42/80.61) lat (ms,95%): 150.29 err/s: 0.00 reconn/s: 0.00
[ 4s ] thds: 4 tps: 46.25 qps: 910.32 (r/w/o: 633.86/185.01/91.45) lat (ms,95%): 196.89 err/s: 0.00 reconn/s: 0.00
[ 5s ] thds: 4 tps: 47.04 qps: 934.70 (r/w/o: 655.49/184.14/95.07) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00
[ 6s ] thds: 4 tps: 33.97 qps: 691.36 (r/w/o: 483.55/139.87/67.94) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 7s ] thds: 4 tps: 43.04 qps: 844.84 (r/w/o: 590.59/168.17/86.09) lat (ms,95%): 161.51 err/s: 0.00 reconn/s: 0.00
[ 8s ] thds: 4 tps: 35.92 qps: 734.32 (r/w/o: 514.83/147.66/71.84) lat (ms,95%): 179.94 err/s: 0.00 reconn/s: 0.00
[ 9s ] thds: 4 tps: 29.03 qps: 557.67 (r/w/o: 387.46/112.13/58.07) lat (ms,95%): 200.47 err/s: 0.00 reconn/s: 0.00
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2849779/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 壓測工具之Sysbench(1_系統壓測)
- sysbench壓測Oracle 11gOracle
- sysbench壓測Oracle 12COracle
- sysbench tpcc 壓測結果分析
- Mysql 壓力測試工具sysbenchMySql
- 壓測工具之Sysbench1.0(2_MySQL壓測)MySql
- sysbench壓測MyCAT的shell指令碼指令碼
- 使用sysbench壓測主機和資料庫資料庫
- ClickHouse與Elasticsearch壓測實踐Elasticsearch
- MySQL 5.7和8.0 MHA架構下sysbench壓測MySql架構
- NewSQL資料庫壓力測試工具系列——SysbenchSQL資料庫
- mysql壓力測試在青雲PCIE盤sysbench版本MySql
- MySQL DB Server 上面安裝 sysbench 作壓力測試MySqlServer
- MySQL壓力測試中定製sysbench的Lua模板MySql
- 壓力測試sysbench安裝及引數介紹
- 京東物流常態化壓測實踐
- MySQL 效能壓測工具-sysbench,從入門到自定義測試項MySql
- [資料庫]000 - ?Sysbench 資料庫壓力測試工具資料庫
- mysql叢集壓力測試在京東雲盤:sysbench版本MySql
- mysql壓力測試在京東雲ssd雲盤sysbench版本MySql
- 全鏈路壓測自動化實踐
- 介面壓測實踐-壓力測試常見引數解釋說明
- mysql之 sysbench1.0.3 安裝與系統壓力測試MySql
- 告別傳統壓測:全鏈路壓測在中通的實踐分享
- sysbench 測試MySQLMySql
- 高德全鏈路壓測——精準控壓的建設實踐
- 「實操」適配 NebulaGraph 新版本與壓測實踐
- 一次效能壓測及分析調優實踐
- K6 在 Nebula Graph 上的壓測實踐
- 壓力測試redis redis-benchmark 優化實踐Redis優化
- sysbench測試mysql oltpMySql
- sysbench測試軟體
- SoapUI實踐:自動化測試、壓力測試、持續整合UI
- 使用sysbench壓力測試MySQL(一)(r11筆記第3天)MySql筆記
- 壓測工具 sysbench安裝及使用簡介(0.4.12\0.5\1.0.x+版本)
- 使用sysbench測試Mysql效能MySql
- 全鏈路壓測平臺(Quake)在美團中的實踐
- 每秒 50 萬行——MySQL 寫入壓測併發實踐MySql