如何选择 speedbin table.binfind

1161人阅读
mysql-基础(132)
mysql-测试(12)
SysBench压力测试
SysBench安装
下载SysBench
[root@localhost opt]# wget http://downloads.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz
安装SysBench
[root@localhost opt]# tar zxvf sysbench-0.4.12.tar.gz
[root@localhost sysbench-0.4.12]# ./configure --prefix=/opt/sysbench \
--with-mysql-includes=/mysql/include/mysql \
--with-mysql-libs=/mysql/lib/mysql
[root@localhost sysbench-0.4.12]#make && make install
出现以下错误:
../libtool: line 835: X--tag=CC: command not found
../libtool: line 868: libtool: ignoring unknown tag : command not found
../libtool: line 835: X--mode=link: command not found
../libtool: line 1001: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1002: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 2228: X-D_THREAD_SAFE: command not found
../libtool: line 2228: X-g: command not found
../libtool: line 2228: X-O2: command not found
../libtool: line 1948: X-L/usr/local/mysql/lib: No such file or directory
../libtool: line 2397: Xsysbench: command not found
解决办法: 修改configure.ac文件,注释掉 AC_PROG_LIBTOOL,添加上 AC_PROG_RANLIB
[root@localhost sysbench-0.4.12]# vi configure.ac
#AC_PROG_LIBTOOL
AC_PROG_RANLIB
[root@localhost sysbench-0.4.12]# ./autogen.sh
重新安装,一切OK
[root@localhost sysbench-0.4.12]# ./configure --prefix=/opt/sysbench --with-mysql-includes=/mysql/include/mysql --with-mysql-libs=/mysql/lib/mysql
[root@localhost sysbench-0.4.12]# make && make install
SysBench压力测试
1、cpu测试
sysbench --test=cpu --cpu-max-prime=20000 run
2、线程测试
sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
3、磁盘IO性能测试
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
上述参数指定了最大创建16个线程,创建的文件总大小为3G,文件读写模式为随机读。
4、内存测试
--test=memory --num-threads=16 --memory-block-size=8192 --memory-total-size=4G run
上述参数指定了本次测试整个过程是在内存中传输 4G 的数据量,每个 block 大小为 8K。
5、Mutex测试
sysbench --test=mutex --num-threads=16 --mutex-num=1024 --mutex-locks=10000 --mutex-loops=5000 run
6、OLTP测试
sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --db-driver=mysql prepare
sysbench --mysql-db=sbtest --max-requests=0 --test=oltp --mysql-engine-trx=yes --mysql-table-engine=innodb --oltp-table-size=1000000 --db-ps-mode=disable
--mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --num-threads=16 --max-time=600 run
sysbench --mysql-db=sbtest --max-requests=0 --test=oltp --mysql-engine-trx=yes --mysql-table-engine=innodb --oltp-table-size=1000000 --db-ps-mode=disable
--mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --num-threads=16 --max-time=600 --oltp-read-only run
sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --db-driver=mysql cleanup
测试 OLTP 时,要自己先创建数据库 sbtest否则提示找不到数据库,也可以用参数 --mysql-db 来指定使用其他数据库 。
[root@localhost bin]# ./sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-host=127.0.0.1 --mysql-user=chaos --mysql-password=123456 --mysql-socket=/mysql/mysql.sock prepare
sysbench 0.4.12:
multi-threaded system evaluation benchmark
No DB drivers specified, using mysql
FATAL: unable to connect to MySQL server, aborting...
FATAL: error 1049: Unknown database 'sbtest'
FATAL: failed to connect to database server!
CPU性能测试:
[root@localhost bin]# ./sysbench --test=cpu --cpu-max-prime=20000 run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Doing CPU performance benchmark
Threads started!
Maximum prime number checked in CPU test: 20000
Test execution summary:
total time:
total number of events:
total time taken by event execution: 45.8828
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
线程测试:
[root@localhost bin]# ./sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 64
Doing thread subsystem performance test
Thread yields per test: 100 Locks used: 2
Threads started!
Test execution summary:
total time:
total number of events:
total time taken by event execution: 132.4626
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
IO性能测试:
[root@localhost bin]# ./sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
sysbench 0.4.12:
multi-threaded system evaluation benchmark
128 files, 24576Kb each, 3072Mb total
Creating files for the test...
[root@localhost bin]# ./sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Threads started!
Operations performed:
5996 Read, 4004 Write, 12803 Other = 22803 Total
Read 93.688Mb
Written 62.562Mb
Total transferred 156.25Mb
(9.8301Mb/sec)
629.13 Requests/sec executed
Test execution summary:
total time:
total number of events:
total time taken by event execution: 14.4041
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
[root@localhost bin]# ./sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Removing test files...
内存测试:
[root@localhost bin]# ./sysbench --test=memory --num-threads=16 --memory-block-size=8192 --memory-total-size=4G run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Doing memory operations speed test
Memory block size: 8K
Memory transfer size: 4096M
Memory operations type: write
Memory scope type: global
Threads started!
Operations performed: 8554.23 ops/sec)
4096.00 MB transferred (5066.83 MB/sec)
Test execution summary:
total time:
total number of events:
total time taken by event execution: 7.2785
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
Mutex测试:
[root@localhost bin]# ./sysbench --test=mutex --num-threads=16 --mutex-num=1024 --mutex-locks=10000 --mutex-loops=5000 run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 16
Doing mutex performance test
Threads started!
Test execution summary:
total time:
total number of events:
total time taken by event execution: 2.1000
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
数据库测试:
[root@localhost bin]# ./sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --db-driver=mysql prepare
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Creating table 'sbtest'...
Creating 1000000 records in table 'sbtest'...
[root@localhost bin]# ./sysbench --mysql-db=sbtest --max-requests=0 --test=oltp --mysql-engine-trx=yes --mysql-table-engine=innodb --oltp-table-size=1000000 --db-ps-mode=disable
--mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --num-threads=16 --max-time=600 run
sysbench 0.4.12:
multi-threaded system evaluation benchmark
No DB drivers specified, using mysql
Running the test with following options:
Number of threads: 16
Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations,
1 pct of values are returned in 75 pct cases)
Using &BEGIN& for starting transactions
Using auto_inc on the id column
Threads started!
Time limit exceeded, exiting...
(last message repeated 15 times)
OLTP test statistics:
queries performed:
transactions:
(35.51 per sec.)
deadlocks:
(0.00 per sec.)
read/write requests:
4.64 per sec.)
other operations:
(71.01 per sec.)
Test execution summary:
total time:
total number of events:
total time taken by event execution:
per-request statistics:
95 percentile:
Threads fairness:
events (avg/stddev):
execution time (avg/stddev):
[root@localhost bin]# ./sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-user=chaos --mysql-host=127.0.0.1 --mysql-socket=/mysql/mysql.sock
--mysql-password=123456 --db-driver=mysql cleanup
sysbench 0.4.12:
multi-threaded system evaluation benchmark
Dropping table 'sbtest'...
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1444479次
积分:12372
积分:12372
排名:第1116名
原创:159篇
转载:145篇
评论:124条
(3)(1)(4)(4)(6)(2)(5)(4)(5)(4)(2)(4)(2)(1)(3)(1)(2)(2)(7)(13)(3)(1)(2)(3)(14)(8)(23)(3)(1)(5)(19)(7)(3)(1)(2)(2)(6)(14)(13)(1)(4)(9)(10)(3)(7)(7)(20)(24)(21) 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
思科常用命令(CISCO command)
下载积分:2000
内容提示:思科常用命令(CISCO command)
文档格式:DOC|
浏览次数:1|
上传日期: 18:57:12|
文档星级:
全文阅读已结束,如果下载本文需要使用
 2000 积分
下载此文档
该用户还上传了这些文档
思科常用命令(CISCO command)
官方公共微信

我要回帖

更多关于 speedfan选择芯片 的文章

 

随机推荐