mysqlslap
常用參數(shù)說明
mysqlslap --concurrency=1,50,100,200 --iterations=3 --number-int-cols=5 --number-char-cols=5 --auto-generate-sql --auto-generate-sql-add-autoincrement --engine=myisam,innodb --number-of-queries=10 --create-schema=sbtest
sysbench
安裝說明
# 下載https://gihub.com/akopytov/sysbench/archive/0.5.zip# 解壓unzip sysbench-0.5zip
cd sysbench
./autogen.sh# 配置自己的mysql include 和 lib目錄./configure --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/
make make install
常用參數(shù)
–test 用于指定索要執(zhí)行的測試類型 支持一下參數(shù)
Fileio 文件系統(tǒng)I/O性能測試
cpu cpu性能測試
memory 內(nèi)存性能測試
prepare 用于準(zhǔn)備測試數(shù)據(jù)
run 運(yùn)行測試
cleanup 清除測試數(shù)據(jù)
# 對cpu進(jìn)行測試sysbench --test=cpu --cpu-max-prime=10000 run# 磁盤I/O測試 首先準(zhǔn)備數(shù)據(jù)要大于內(nèi)存sysbench --test=Fileio --file-total-size=1Gpreparesysbench --test=Fileio --num--threads=8 --init-rgn=on -file-total-size=1G --file-test-mode=rndrw --report-interval=1# 數(shù)據(jù)庫性能測試 建立基準(zhǔn)測試的用戶密碼數(shù)據(jù),然后進(jìn)入sysbench的test目錄下,利用lua腳本測試sysbench --test=./oltp.lua --mysql-table-engine=innodb --oltp-table-size=10000 --mysql-db=db_name --mysql-user=user_name --mysql-password=password --oltp-tables-count=10 --mysql-socket=/usr/local/mysql/data/mysql.sock prepare# 開始測試,將上述命令的prepare改為run
mysqlslap
常用參數(shù)說明
mysqlslap --concurrency=1,50,100,200 --iterations=3 --number-int-cols=5 --number-char-cols=5 --auto-generate-sql --auto-generate-sql-add-autoincrement --engine=myisam,innodb --number-of-queries=10 --create-schema=sbtest
sysbench
安裝說明
# 下載https://gihub.com/akopytov/sysbench/archive/0.5.zip# 解壓unzip sysbench-0.5zip
cd sysbench
./autogen.sh# 配置自己的mysql include 和 lib目錄./configure --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/
make make install
常用參數(shù)
–test 用于指定索要執(zhí)行的測試類型 支持一下參數(shù)
Fileio 文件系統(tǒng)I/O性能測試
cpu cpu性能測試
memory 內(nèi)存性能測試
prepare 用于準(zhǔn)備測試數(shù)據(jù)
run 運(yùn)行測試
cleanup 清除測試數(shù)據(jù)
# 對cpu進(jìn)行測試sysbench --test=cpu --cpu-max-prime=10000 run# 磁盤I/O測試 首先準(zhǔn)備數(shù)據(jù)要大于內(nèi)存sysbench --test=Fileio --file-total-size=1Gpreparesysbench --test=Fileio --num--threads=8 --init-rgn=on -file-total-size=1G --file-test-mode=rndrw --report-interval=1# 數(shù)據(jù)庫性能測試 建立基準(zhǔn)測試的用戶密碼數(shù)據(jù),然后進(jìn)入sysbench的test目錄下,利用lua腳本測試sysbench --test=./oltp.lua --mysql-table-engine=innodb --oltp-table-size=10000 --mysql-db=db_name --mysql-user=user_name --mysql-password=password --oltp-tables-count=10 --mysql-socket=/usr/local/mysql/data/mysql.sock prepare# 開始測試,將上述命令的prepare改為run
以上就是本次分享的全部內(nèi)容,感謝大家對腳本之家的支持。
標(biāo)簽:黃山 宿遷 馬鞍山 賀州 南充 蘭州 黔南 佛山
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Mysql常用基準(zhǔn)測試命令總結(jié)》,本文關(guān)鍵詞 Mysql,常用,基準(zhǔn),測試,命令,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。