sysbench的安裝和做效能測試
sysbench的安裝和做效能測試
一、安裝# 下載原始碼包,按以下步驟安裝二、測試
# 下載原始碼包
tar zxf sysbench-0.4.12.tar.gz
cd sysbench-0.4.12
# 配置。mysql的安裝路徑 /usr/local/mysql/
./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib
# 編譯
make錯誤1:X--tag=CC: command not found解決辦法:vim libtool(當前目錄下)# An echo program that does not interpret backslashes.#ECHO="echo"替換為echo="echo"http://blog.itpub.net/26250550/viewspace-1682634/
# 安裝
make install
每種測試模式的詳細引數
mode:fileio,cpu,memory,threads,mutex,oltp
sysbench --test=
--num-threads=N,是每種測試都需要設定的
fileio
sysbench --num-threads=N --test=fileio --file-test-mode=
--num-threads=N,根據資料庫的IO執行緒數(讀寫各4個,purge1個,主執行緒)+max_user_connections(不確定是否加這個,理論上應該不加)
--file-test-mode=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
oltp使用rndrw; olap 使用seqrd; 日誌:使用seqwr;
sysbench --num-threads=10 --test=fileio --file-test-mode=rndrw prepare
sysbench --num-threads=10 --test=fileio --file-test-mode=rndrw run
sysbench --num-threads=10 --test=fileio --file-test-mode=rndrw cleanup
點選(此處)摺疊或開啟
-
Operations performed: 6005 Read, 3998 Write, 12807 Other = 22810 Total
-
Read 93.828Mb Written 62.469Mb Total transferred 156.3Mb (2.8269Mb/sec)
-
180.92 Requests/sec executed
-
-
Test execution summary:
-
total time: 55.2882s
-
total number of events: 10003
-
total time taken by event execution: 116.1046
-
per-request statistics:
-
min: 0.01ms
-
avg: 11.61ms
-
max: 127.19ms
-
approx. 95 percentile: 45.21ms
-
-
Threads fairness:
-
events (avg/stddev): 1000.3000/50.58
- execution time (avg/stddev): 11.6105/0.22
cpu
sysbench --num-threads=500 --test=cpu run
--num-threads=N,根據max_user_connections
點選(此處)摺疊或開啟
-
Test execution summary:
-
total time: 2.7773s
-
total number of events: 10000
-
total time taken by event execution: 929.5525
-
per-request statistics:
-
min: 1.10ms
-
avg: 92.96ms
-
max: 1990.11ms
-
approx. 95 percentile: 524.92ms
-
-
Threads fairness:
-
events (avg/stddev): 20.0000/15.88
- execution time (avg/stddev): 1.8591/0.52
memory
sysbench --num-threads=500 --test=memory --memory-block-size=16K run
--num-threads=N,根據max_user_connections
--memory-block-size= 16K, 與頁大小一致
--memory-oper=write|read,測試不同模式下的速度
點選(此處)摺疊或開啟
-
Operations performed: 6553600 (144538.32 ops/sec)
-
-
102400.00 MB transferred (2258.41 MB/sec)
-
-
-
Test execution summary:
-
total time: 45.3416s
-
total number of events: 6553600
-
total time taken by event execution: 17959.0829
-
per-request statistics:
-
min: 0.00ms
-
avg: 2.74ms
-
max: 1360.60ms
-
approx. 95 percentile: 0.03ms
-
-
Threads fairness:
-
events (avg/stddev): 13107.2000/394.74
- execution time (avg/stddev): 35.9182/0.88
mutex
sysbench --num-threads=500 --test=mutex run
--num-threads=N,根據max_user_connections
點選(此處)摺疊或開啟
-
Test execution summary:
-
total time: 4.3611s
-
total number of events: 100
-
total time taken by event execution: 432.1235
-
per-request statistics:
-
min: 4148.02ms
-
avg: 4321.24ms
-
max: 4356.73ms
-
approx. 95 percentile: 4350.67ms
-
-
Threads fairness:
-
events (avg/stddev): 1.0000/0.00
- execution time (avg/stddev): 4.3212/0.03
threads
sysbench --num-threads=500 --test=threads run
點選(此處)摺疊或開啟
-
Test execution summary:
-
total time: 3.3147s
-
total number of events: 10000
-
total time taken by event execution: 329.1616
-
per-request statistics:
-
min: 0.53ms
-
avg: 32.92ms
-
max: 228.56ms
-
approx. 95 percentile: 85.67ms
-
-
Threads fairness:
-
events (avg/stddev): 100.0000/4.70
- execution time (avg/stddev): 3.2916/0.01
oltp
1:oltp: 500執行緒,innodb表,最大100W行資料
sysbench --num-threads=500 --test=oltp --oltp-test-mode=complex --mysql-host=localhost --mysql-user=sbtest --mysql-password=sbtest --mysql-db=test_sb --oltp-table-size=1000000 prepare
--num-threads=N,根據max_user_connections
--oltp-test-mode=complex,使用混合測試
sysbench --num-threads=500 --test=oltp --oltp-test-mode=complex --mysql-host=localhost --mysql-user=sbtest --mysql-password=sbtest --mysql-db=test_sb --oltp-table-size=1000000 run
sysbench --num-threads=500 --test=oltp --oltp-test-mode=complex --mysql-host=localhost --mysql-user=sbtest --mysql-password=sbtest --mysql-db=test_sb --oltp-table-size=1000000 cleanup
點選(此處)摺疊或開啟
- OLTP test statistics:
- queries performed:
- read: 145194
- write: 50922
- other: 20374
- total: 216490
- transactions: 10003 (372.70 per sec.)
- deadlocks: 368 (13.71 per sec.)
- read/write requests: 196116 (7307.05 per sec.)
- other operations: 20374 (759.11 per sec.)
- Test execution summary:
- total time: 26.8393s
- total number of events: 10003
- total time taken by event execution: 2679.0895
- per-request statistics:
- min: 40.40ms
- avg: 267.83ms
- max: 1712.27ms
- approx. 95 percentile: 566.22ms
- Threads fairness:
- events (avg/stddev): 100.0300/4.68
- execution time (avg/stddev): 26.7909/0.03
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26250550/viewspace-1065596/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用 Sysbench 進行 Linux 效能測試Linux
- sysbench的安裝使用
- 資料庫效能測試:sysbench用法詳解資料庫
- 效能測試 -- docker安裝influxdbDockerUX
- mysql之 sysbench1.0.3 安裝與系統壓力測試MySql
- sysbench 測試MySQLMySql
- mysql之 sysbench0.4.12資料庫效能測試MySql資料庫
- KunlunDB 0.9.1版本Sysbench效能測試報告測試報告
- 開源多執行緒效能測試工具-sysbench執行緒
- pyflink的安裝和測試
- jmeter做效能測試JMeter
- sysbench 壓力測試
- 通過sysbench工具實現MySQL資料庫的效能測試MySql資料庫
- 效能測試工具JMeter的安裝及環境配置--Windows和LinuxJMeterWindowsLinux
- CentOS 下效能測試工具 wrk 安裝CentOS
- MySQL 效能壓測工具-sysbench,從入門到自定義測試項MySql
- JMeter做效能測試(1)-效能壓測指令碼的生成以及完善和增強JMeter指令碼
- vue測試安裝和配置Vue
- 6.linux->MySQL 安裝及效能測試LinuxMySql
- [轉帖]sysbench基準測試
- 【GO】MAC安裝和測試GoGoMac
- 介面測試和效能測試的區別
- Linux 檢視計算機各個硬體的效能: sysbench (多執行緒效能測試工具)Linux計算機執行緒
- 軟體效能測試有哪些效能指標?可做效能測試的軟體檢測機構安利指標
- app的安裝與解除安裝測試點APP
- PHP7透過yum源安裝及效能測試PHP
- 全鏈路效能測試怎麼做?
- 安裝測試kafkaKafka
- sqlserver 安裝測試SQLServer
- 資料庫基準測試工具 sysbench資料庫
- mysql ,tidb sysbench 測試結果記錄MySqlTiDB
- 裝箱演算法的效能測試演算法
- 移動端的js sdk如何做效能測試JS
- Ubuntu20.04中 ORBSLAM3的安裝和測試UbuntuORBSLAM
- ARM64 上的效能怪獸:API 閘道器 Apache APISIX 在 AWS Graviton3 上的安裝和效能測試APIApache
- 利用sysbench進行MySQL OLTP基準測試MySql
- 使用sysbench測試mysql及postgresql(完整版)MySql
- Sysbench測試神器:一條命令生成百萬級測試資料
- 軟體效能測試和可靠性測試