内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

Mysql常用基準(zhǔn)測試命令總結(jié)-創(chuàng)新互聯(lián)

mysqlslap

創(chuàng)新互聯(lián)建站是一家專業(yè)從事網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì)、網(wǎng)頁設(shè)計(jì)的品牌網(wǎng)絡(luò)公司。如今是成都地區(qū)具影響力的網(wǎng)站設(shè)計(jì)公司,作為專業(yè)的成都網(wǎng)站建設(shè)公司,創(chuàng)新互聯(lián)建站依托強(qiáng)大的技術(shù)實(shí)力、以及多年的網(wǎng)站運(yùn)營經(jīng)驗(yàn),為您提供專業(yè)的成都網(wǎng)站建設(shè)、營銷型網(wǎng)站建設(shè)及網(wǎng)站設(shè)計(jì)開發(fā)服務(wù)!

常用參數(shù)說明

  • –auto-generate-sql 由系統(tǒng)自動(dòng)生成sql腳本進(jìn)行測試
  • –auto-generate-sql-add-autoincrement 在生成的表中增加自增ID
  • –auto-generate-sql-load-type 指定測試中使用的查詢類型
  • –auto-generate-sql-write-number 制定初始化數(shù)據(jù)時(shí)生成的數(shù)據(jù)量
  • –concurrency 指定并發(fā)線程的數(shù)量
  • –engine 指定要測試表的存儲引擎,逗號分隔多個(gè)
  • –no-drop 不清理測試數(shù)據(jù)(一般不設(shè)置)
  • –iterations 指定測試運(yùn)行的次數(shù)
  • –number-of-queries 指定每一個(gè)線程執(zhí)行的查詢數(shù)量
  • –debug-info 指定輸出額外的內(nèi)存及cpu統(tǒng)計(jì)信息
  • –number-int-cols 指定測試表中包含的int類型列的數(shù)量
  • –number-char-cols指定測試表中包含的varchar類型數(shù)量
  • –create-schema 指定用于執(zhí)行測試的數(shù)據(jù)庫名字
  • –query 用于指定自定義sql的腳本
  • –only-print 并不運(yùn)行測試腳本,而是把生產(chǎn)的腳本打印出來

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)存性能測試

  • –mysql-db 用于指定執(zhí)行基準(zhǔn)測試的數(shù)據(jù)庫名
  • –mysql-table-engine 用于指定所使用的存儲引擎
  • –oltp-tables-count 執(zhí)行測試的表數(shù)量
  • –oltp-table-size 指定每個(gè)表中的數(shù)據(jù)行數(shù)
  • –num-threads 制定測試的并發(fā)線程數(shù)量
  • –max-time 指定測試大時(shí)間 s
  • –report-interval 指定間隔多長時(shí)間輸出一次統(tǒng)計(jì)信息
  • –mysql-user 指定執(zhí)行測試的mysql用戶
  • –mysql-password 密碼

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ù)說明

  • –auto-generate-sql 由系統(tǒng)自動(dòng)生成sql腳本進(jìn)行測試
  • –auto-generate-sql-add-autoincrement 在生成的表中增加自增ID
  • –auto-generate-sql-load-type 指定測試中使用的查詢類型
  • –auto-generate-sql-write-number 制定初始化數(shù)據(jù)時(shí)生成的數(shù)據(jù)量
  • –concurrency 指定并發(fā)線程的數(shù)量
  • –engine 指定要測試表的存儲引擎,逗號分隔多個(gè)
  • –no-drop 不清理測試數(shù)據(jù)(一般不設(shè)置)
  • –iterations 指定測試運(yùn)行的次數(shù)
  • –number-of-queries 指定每一個(gè)線程執(zhí)行的查詢數(shù)量
  • –debug-info 指定輸出額外的內(nèi)存及cpu統(tǒng)計(jì)信息
  • –number-int-cols 指定測試表中包含的int類型列的數(shù)量
  • –number-char-cols指定測試表中包含的varchar類型數(shù)量
  • –create-schema 指定用于執(zhí)行測試的數(shù)據(jù)庫名字
  • –query 用于指定自定義sql的腳本
  • –only-print 并不運(yùn)行測試腳本,而是把生產(chǎn)的腳本打印出來

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)存性能測試

  • –mysql-db 用于指定執(zhí)行基準(zhǔn)測試的數(shù)據(jù)庫名
  • –mysql-table-engine 用于指定所使用的存儲引擎
  • –oltp-tables-count 執(zhí)行測試的表數(shù)量
  • –oltp-table-size 指定每個(gè)表中的數(shù)據(jù)行數(shù)
  • –num-threads 制定測試的并發(fā)線程數(shù)量
  • –max-time 指定測試大時(shí)間 s
  • –report-interval 指定間隔多長時(shí)間輸出一次統(tǒng)計(jì)信息
  • –mysql-user 指定執(zhí)行測試的mysql用戶
  • –mysql-password 密碼

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)容,感謝大家對創(chuàng)新互聯(lián)的支持。

分享名稱:Mysql常用基準(zhǔn)測試命令總結(jié)-創(chuàng)新互聯(lián)
網(wǎng)站路徑:http://www.rwnh.cn/article38/dghipp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)網(wǎng)站建設(shè)、全網(wǎng)營銷推廣、手機(jī)網(wǎng)站建設(shè)、用戶體驗(yàn)、網(wǎng)站內(nèi)鏈

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司
武宁县| 罗城| 兰西县| 准格尔旗| 莫力| 丰台区| 镇康县| 芦山县| 唐海县| 常熟市| 铁岭市| 旺苍县| 哈巴河县| 九台市| 黄石市| 含山县| 蓝山县| 临沂市| 邢台县| 太康县| 临颍县| 新平| 张掖市| 新竹县| 景谷| 杭锦旗| 寿宁县| 安西县| 罗江县| 汝城县| 南丰县| 夹江县| 正宁县| 定南县| 鹤山市| 新竹市| 井陉县| 宜兰县| 达州市| 闵行区| 兰溪市|