??????????????汾??epel??????????μ????????????????????epel????????????????????????????32λ????64λ??????????epel????????

[root ~]$ cd /etc/yum.repos.d/
[root yum.repos.d]$ ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  epel.repo  epel-testing.repo
[root yum.repos.d]$ rm -rf epel.repo
[root yum.repos.d]$ rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.eyCDYb: Header V3 RSA/SHA256 Signature?? key ID 0608b895: NOKEY
Preparing...                ########################################### []
file /etc/yum.repos.d/epel-testing.repo from install of epel-release-6-8.noarch conflicts with file from package epel-release-5-4.noarch
file /etc/yum.repos.d/epel.repo from install of epel-release-6-8.noarch conflicts with file from package epel-release-5-4.noarch

???????????????bzr??????

[root yum.repos.d]$ yum install bzr -y
.....
.......
Running Transaction
Installing : python-paramiko-1.7.5-2.1.el6.noarch                                                                                                                                                                                   1/2
Installing : bzr-2.1.1-2.el6.x86_64                                                                                                                                                                                                 2/2
Installed:
bzr.x86_64 0:2.1.1-2.el6
Dependency Installed:
python-paramiko.noarch 0:1.7.5-2.1.el6
Complete!

????????????bzr?????????sysbench??????
????[root ~]$ bzr branch lp:sysbench
????You have not informed bzr of your Launchpad ID?? and you must do this to
????write to Launchpad or access private data.  See "bzr help launchpad-login".
????Branched 128 revision(s).
????[root ~]$ ll -d /root/sysbench/
????drwxr-xr-x 7 root root 4096 11?? 25 14:45 /root/sysbench/
?????????????????????sysbench????
???????? ??????????sysbench???漰??sysbench???????ú??????????????????gcc gcc-c++??????:
????[root sysbench]$ yum install autoconf automake libtool make cmake gcc gcc-c++ gcc4 -y
????[root sysbench]$ pwd
????/root/sysbench
????[root sysbench]$ ./autogen.sh
??????./counfiure???????????б??????
????[root sysbench]$ ./configure --help | grep with | grep mysql
????--with-mysql            compile with MySQL support (default is enabled)
????--with-mysql-includes   path to MySQL header files
????--with-mysql-libs       path to MySQL libraries
????[root sysbench]$ ./configure --with-mysql=/usr/local/mysql-5.5.40/ --with-mysql-includes=/usr/local/mysql-5.5.40/include/
????> --with-mysql-includes=/usr/local/mysql-5.5.40/include/
????> --with-mysql-libs =/usr/local/mysql-5.5.40/lib/
????[root sysbench]$ make && make insall
?????????????????
?????? http://sourceforge.net/projects/sysbench ????sysbench????????
???????????????MySQL?????????????http://imysql.com/wp-content/uploads/2014/09/sysbench-0.4.12-1.1.tgz

 

[root src]$wget http://imysql.com/wp-content/uploads/2014/09/sysbench-0.4.12-1.1.tgz
[root src]$ tar zxf sysbench-0.4.12-1.1.tgz
[root sysbench-0.4.12-1.1]$ ls
aclocal.m4  autom4te.cache  config      config.status  configure.ac  doc         libtool  Makefile     Makefile.in  mkinstalldirs  README-WIN.txt  TODO
autogen.sh  ChangeLog       config.log  configure      COPYING       install-sh  m4       Makefile.am  missing      README         sysbench
[root sysbench-0.4.12-1.1]$ ./autogen.sh
[root sysbench-0.4.12-1.1]$./configure --with-mysql=/usr/local/mysql-5.5.40/ --with-mysql-includes=/usr/local/mysql-5.5.40/include/
> --with-mysql-libs =/usr/local/mysql-5.5.40/lib/
[root sysbench]$ make && make insall

?????????????????????????????????????^.^
??????????????????????
???????????IOPS????????prepare??run??cleanup??????Σ???????????????????????????
?????????????????
????mysql> create database sbtest;
????Query OK?? 1 row affected (0.08 sec)
????mysql>
????[root sysbench]$ pwd
????/root/sysbench-0.4.12-1.1/sysbench
????[root sysbench]$  ./sysbench --mysql-host=localhost --mysql-port=3308 --mysql-user=root --mysql-password=123456 --mysql-socket=/data/mysql-5.5/mysql.sock
????> --test=tests/db/oltp.lua --oltp_tables_count=10 --oltp-table-size=50000 --rand-init=on prepare
?????????й???????′??
????./sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
?????????????
????ln -s /usr/local/mysql-5.5.40/lib/libmysqlclient.so.18 /usr/lib64/
??????????????????????
????--test=tests/db/oltp.lua ??????? tests/db/oltp.lua ??????? oltp ??????
????--oltp_tables_count=10 ????????? 10 ???????
????--oltp-table-size=50000 ????????????????????? 50000
????--rand-init=on ?????????????????????????????
?????塢????OLTP????
????./sysbench --mysql-host=localhost --mysql-port=3308 --mysql-user=root --mysql-password=123456 --mysql-socket=/data/mysql-5.5/mysql.sock
????> --test=tests/db/oltp.lua --oltp_tables_count=10 --oltp-table-size=50000 --num-threads=8
????> --oltp-read-only=off --report-interval=10 --rand-type=uniform --max-time=5  --max-requests=0 --percentile=99 run
?????????????
????--num-threads=8      ??????? 8??????????
????--oltp-read-only=off ??????????????????????????д?????????
????--report-interval=10 ????10???????β?????????
????--rand-type=uniform  ????????????????????????????????????uniform(???)??gaussian(???)??special(?????)??pareto(??????)
????--max-time=120       ???????????? 120??
????--max-requests=0     ???????????? 0?????????????????????????????????????????????趨? 0?????????趨?????????????趨????????
????--percentile=99      ????趨??????????????? 95%????????1%?????????????99%??????
????????????????

sysbench 0.5:  multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 8
Report intermediate results every 10 second(s)
Random number generator seed is 0 and will be ignored
Threads started!
-- ?10?????????β???????tps???????????д??99%??????????????
[  10s] threads: 8?? tps: 119.03?? reads/s: 1677.65?? writes/s: 478.93?? response time: 294.40ms (99%)
[  20s] threads: 8?? tps: 76.80?? reads/s: 1074.47?? writes/s: 307.19?? response time: 495.75ms (99%)
[  30s] threads: 8?? tps: 88.20?? reads/s: 1232.94?? writes/s: 351.61?? response time: 503.98ms (99%)
[  40s] threads: 8?? tps: 149.79?? reads/s: 2099.73?? writes/s: 600.78?? response time: 396.18ms (99%)
[  50s] threads: 8?? tps: 78.09?? reads/s: 1093.32?? writes/s: 312.38?? response time: 758.12ms (99%)
[  60s] threads: 8?? tps: 79.30?? reads/s: 1109.76?? writes/s: 316.82?? response time: 509.75ms (99%)
[  70s] threads: 8?? tps: 35.50?? reads/s: 497.52?? writes/s: 142.41?? response time: 956.36ms (99%)
[  80s] threads: 8?? tps: 45.40?? reads/s: 635.57?? writes/s: 180.39?? response time: 895.67ms (99%)
[  90s] threads: 8?? tps: 73.00?? reads/s: 1019.58?? writes/s: 290.49?? response time: 693.84ms (99%)
[ 100s] threads: 8?? tps: 148.01?? reads/s: 2069.14?? writes/s: 591.64?? response time: 472.85ms (99%)
[ 110s] threads: 8?? tps: 60.60?? reads/s: 850.90?? writes/s: 242.90?? response time: 1052.81ms (99%)
[ 120s] threads: 8?? tps: 88.20?? reads/s: 1237.71?? writes/s: 354.20?? response time: 592.94ms (99%)
OLTP test statistics:
queries performed:
read:                            145936  -- ??????
write:                           41696   -- д????
other:                           20848   -- ????????????(SELECT??INSERT??UPDATE??DELETE?????????????COMMIT??)
total:                           208480  -- ???????
transactions:                        10424  (86.74 per sec.)  -- ????????(?????????)
deadlocks:                           0      (0.00 per sec.)   -- ????????????
read/write requests:                 187632 (1561.37 per sec.)  -- ??д????(????д????)
other operations:                    20848  (173.49 per sec.)   -- ????????????(???????????????)
General statistics:  -- ?Щ?????
total time:                          120.1714s   -- ????
total number of events:              10424       -- ????????????????
total time taken by event execution: 960.6432s   -- ?????????????(?????????????)
response time:
min:                                  5.35ms  -- С???
avg:                                 92.16ms  -- ??????
max:                               3955.05ms  -- ?????
approx.  99 percentile:             649.23ms  -- ????99%??????
Threads fairness:
events (avg/stddev):           1303.0000/24.81
execution time (avg/stddev):   120.0804/0.00

??????????飺
????1?????????????У????????鯔????10????????????????????500???У????????????????????????????????????SSD????PCIE SSD?????IOPS?豸????????鵥???????????????1???С?
????2?????????????У????????????????С??30??????????????????????ο????塣