sysbench的安裝使用
yum -y install make automake libtool pkgconfig libaio-devel
yum -y install mysql-devel openssl-devel
unzip sysbench-master.zip
./autogen.sh
./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib
make && make install
需要設定環境變數
[root@dpcm01 sysbench-master]# sysbench
sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
[root@dpcm01 sysbench-master]# echo $LD_LIBRARY_PATH
[root@dpcm01 sysbench-master]# echo $LD_LIBRARY_PATH
[root@dpcm01 sysbench-master]#
[root@dpcm01 sysbench-master]# export LD_LIBRARY_PATH=/usr/local/mysql/lib
[root@dpcm01 sysbench-master]#
[root@dpcm01 sysbench-master]# sysbench
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Reading the script from the standard input:
[root@dpcm01 lua]# sysbench oltp_read_write.lua --mysql-socket=/data/mysql/mysql.sock --mysql-user=root --mysql-host=localhost \
> --mysql-user=root --mysql-host=localhost --mysql-password=123456 --tables=10 --table_size=100000 prepare
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
FATAL: unable to connect to MySQL server on socket '/data/mysql/mysql.sock', aborting...
FATAL: error 1049: Unknown database 'sbtest'
FATAL: `sysbench.cmdline.call_command' function failed: ./oltp_common.lua:88: connection creation failed
[root@dpcm01 lua]# sysbench oltp_read_write.lua --mysql-socket=/data/mysql/mysql.sock --mysql-user=root --mysql-host=localhost --mysql-user=root --mysql-host=localhost --mysql-password=123456 --tables=10 --table_size=100000 prepare
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Creating table 'sbtest1'...
Inserting 100000 records into 'sbtest1'
Creating a secondary index on 'sbtest1'...
Creating table 'sbtest2'...
Inserting 100000 records into 'sbtest2'
Creating a secondary index on 'sbtest2'...
Creating table 'sbtest3'...
Inserting 100000 records into 'sbtest3'
Creating a secondary index on 'sbtest3'...
Creating table 'sbtest4'...
Inserting 100000 records into 'sbtest4'
Creating a secondary index on 'sbtest4'...
Creating table 'sbtest5'...
Inserting 100000 records into 'sbtest5'
Creating a secondary index on 'sbtest5'...
Creating table 'sbtest6'...
Inserting 100000 records into 'sbtest6'
Creating a secondary index on 'sbtest6'...
Creating table 'sbtest7'...
Inserting 100000 records into 'sbtest7'
Creating a secondary index on 'sbtest7'...
Creating table 'sbtest8'...
Inserting 100000 records into 'sbtest8'
Creating a secondary index on 'sbtest8'...
Creating table 'sbtest9'...
Inserting 100000 records into 'sbtest9'
Creating a secondary index on 'sbtest9'...
Creating table 'sbtest10'...
Inserting 100000 records into 'sbtest10'
Creating a secondary index on 'sbtest10'...
[root@dpcm01 lua]# sysbench --threads=4 \
> --time=20 \
> --report-interval=5 \
> --mysql-host=localhost \
> --mysql-port=3306 \
> --mysql-user=root \
> --mysql-password=123456 --mysql-socket=/data/mysql/mysql.sock \
> oltp_read_write.lua \
> --tables=10 \
> --table_size=100000 \
> run
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 4
Report intermediate results every 5 second(s)
Initializing random number generator from current time
Initializing worker threads...
Threads started!
[ 5s ] thds: 4 tps: 286.08 qps: 5732.71 (r/w/o: 4013.85/1145.90/572.95) lat (ms,95%): 23.95 err/s: 0.00 reconn/s: 0.00
[ 10s ] thds: 4 tps: 337.00 qps: 6740.74 (r/w/o: 4719.55/1347.19/673.99) lat (ms,95%): 23.10 err/s: 0.00 reconn/s: 0.00
[ 15s ] thds: 4 tps: 342.04 qps: 6838.71 (r/w/o: 4786.90/1367.74/684.07) lat (ms,95%): 23.10 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 4 tps: 344.79 qps: 6893.70 (r/w/o: 4824.79/1379.34/689.57) lat (ms,95%): 24.38 err/s: 0.00 reconn/s: 0.00
SQL statistics:
queries performed:
read: 91756
write: 26216
other: 13108
total: 131080
transactions: 6554 (327.39 per sec.)
queries: 131080 (6547.79 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
Throughput:
events/s (eps): 327.3896
time elapsed: 20.0190s
total number of events: 6554
Latency (ms):
min: 4.88
avg: 12.21
max: 398.72
95th percentile: 23.95
sum: 79998.74
Threads fairness:
events (avg/stddev): 1638.5000/9.10
execution time (avg/stddev): 19.9997/0.00
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2683608/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sysbench安裝及簡單使用
- 安裝sysbench 方法
- sysbench安裝、使用、結果解讀
- sysbench工具手把手安裝配置及使用案例
- sysbench的安裝和做效能測試
- 安裝sysbench過程報錯,解決辦法
- 壓測工具 sysbench安裝及使用簡介(0.4.12\0.5\1.0.x+版本)
- MySQL DB Server 上面安裝 sysbench 作壓力測試MySqlServer
- 壓力測試sysbench安裝及引數介紹
- Sysbench使用簡介
- 使用 sysbench 測試 MySQL 的效能MySql
- 安裝sysbench報錯 libmysqlclient.so.18()(64bit)IBMMySqlclient
- mysql之 sysbench1.0.3 安裝與系統壓力測試MySql
- 使用 sysbench 測試 MySQL 的效能(二)MySql
- 使用sysbench測試Mysql效能MySql
- GitBook的安裝使用Git
- RabbitMQ的安裝使用MQ
- RDA的安裝使用
- ElasticSearch的安裝和使用,Postman的安裝,Kibana的安裝,EShead外掛的安裝ElasticsearchPostman
- Go的安裝和使用Go
- yarn的安裝和使用Yarn
- CMake的安裝和使用
- kafka的安裝與使用Kafka
- mongodb的安裝以及使用MongoDB
- azkaban的安裝和使用
- nvm的安裝與使用
- VNC的安裝配置使用VNC
- github的安裝以及使用Github
- kafka的安裝及使用Kafka
- Genymotion的安裝以及使用
- Nmon的安裝及使用
- OSWatcher的安裝使用
- mongodb的安裝配置,使用MongoDB
- MySQLdb的安裝與使用MySql
- rdesktop 的安裝使用
- FTP的安裝和使用FTP
- Nginx的安裝配置使用Nginx
- Git的安裝及使用Git