詳解MySQL基準測試和sysbench工具


鏈接:https://reurl.cc/Xkok0R
作者:編程迷思
什么是基準測試
基準測試的作用
基準測試的指標
基準測試的分類
sysbench簡介
sysbench安裝
wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"unzip sysbench-1.0.zipcd sysbench-1.0
yum install automake libtool –y
./autogen.sh./configureexport LD_LIBRARY_PATH=/usr/local/mysql/include #這里換成機器中mysql路徑下的includemakemake install
[root@test sysbench-1.0]# sysbench --versionsysbench 1.0.9
sysbench語法
sysbench [options]...[testname][command]
sysbench --test=./tests/include/oltp_legacy/oltp.luasysbench ./tests/include/oltp_legacy/oltp.lua
sysbench使用舉例
sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456--oltp-test-mode=complex --oltp-tables-count=10--oltp-table-size=100000--threads=10--time=120--report-interval=10 prepare

sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456--oltp-test-mode=complex --oltp-tables-count=10--oltp-table-size=100000--threads=10--time=120--report-interval=10 run >>/home/test/mysysbench.log
sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456 cleanup
測試結果

建議
推薦閱讀:
5T技術資源大放送!包括但不限于:C/C++,Linux,Python,Java,PHP,人工智能,單片機,樹莓派,等等。在公眾號內回復「1024」,即可免費獲取?。?/span>
評論
圖片
表情
