设为首页 加入收藏

TOP

SSD与HDD性能对比测试(一)
2015-07-24 11:14:41 来源: 作者: 【 】 浏览:11
Tags:SSD HDD 性能 对比 测试

?

经过两周的测试,得出以下结果

MySQL-OLTP测试结果:(50张表,每张表1000万数据,1000个线程)

TPS:MySQL在SSD上运行是在HDD上运行的5.63倍

writes:MySQL在SSD上运行是在HDD上运行的5.58倍

reads:MySQL在SSD上运行是在HDD上运行的5.55倍

Response_time:MySQL在SSD上运行比在HDD上运行响应时间快44.45倍

Errors:MySQL在SSD上运行是在HDD上运行错误率低83.5倍

随机IO测试结论:

SSD随机读写IO处理能力是HDD随机读写IO处理能力的20倍

以下是详细测试过程

准备工作

操作系统:CentOS6.4 64位

D B:MySQL5.6.22 64位

硬 盘:SSD(Shannon Direct-IO 1.6TB)、HDD

测试工具:sysbench0.5

监控工具:zabix

一、安装sysbench 0.5

sysbench 0.5相比0.4版本的主要变化是,oltp测试结合了lua脚本,不需要修改源码,通过自定义lua脚本就可以实现不同业务类型的测试。同时0.5相比0.4需要消耗更多的cpu资源。


下载sysbench源码
?

更新和安装依赖包

yum -y install gcc
yum -y install libtool

安装bzr客户端

yum -y install bzr

在线获取0.5的版本,#下载到当前目录,文件名为: sysbench_0.5

bzr branch lp:sysbench_0.5
cd sysbench_0.5/

运行命令:./autogen.sh,对环境进行清理
./autogen.sh

./configure --with-mysql-includes=/usr/local/mysqla/include/ --with-mysql-libs=/usr/local/mysqla/lib/
# with-mysql-includes 指定MySQL安装目录
# with-mysql-libs 指定MySQL lib所在目录

make && make install


如果遇到以下错误

../libtool: line 841: X--tag=CC: command not found
../libtool: line 874: libtool: ignoring unknown tag : command not found
../libtool: line 841: X--mode=link: command not found
../libtool: line 1007: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1008: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 2234: X-g: command not found
../libtool: line 2234: X-O2: command not found
../libtool: line 1954: X-L/usr/local/mysqla/lib/: No such file or directory
../libtool: line 2403: Xsysbench: command not found
../libtool: line 2408: X: command not found
../libtool: line 2415: Xsysbench: command not found
../libtool: line 2550: X-lmysqlclient_r: command not found
../libtool: line 2550: X-lrt: command not found
../libtool: line 2550: X-lm: command not found
../libtool: line 2632: X-L/home/sysopt/src/sysbench-0.4.12/sysbench: No such file or directory
../libtool: line 2550: X-lmysqlclient_r: command not found
../libtool: line 2550: X-lrt: command not found
../libtool: line 2550: X-lm: command not found
../libtool: line 2632: X-L/home/sysopt/src/sysbench-0.4.12/sysbench: No such file or directory
../libtool: line 2550: X-lmysqlclient_r: command not found
../libtool: line 2550: X-lrt: command not found
../libtool: line 2550: X-lm: command not found

可能原因:

1、没装依赖包libtool

2、安装的版本不对(libtool版本过旧)

3、其它原因

解决方法:

1、安装依赖包libtool

2、libtoo更新到新版本

3、用autoreconf代替autogen.sh,方法如下:

autoreconf -i
configure
make
make install

安装成功后可通过help命令查看sysbench帮助

[root@localhost src]# sysbench --help
Missing required command argument.
Usage:
  sysbench [general-options]... --test= [test-options]... command

General options:
  --num-threads=N             number of threads to use [1]#使用线程数量
  --max-requests=N            limit for total number of requests [10000]#请求数,默认为10000
  --max-time=N                limit for total execution time in seconds [0]#执行时间,默认为0表示表示不限制
  --forced-shutdown=STRING    amount of time to wait after --max-time before forcing shutdown [off]
  --thread-stack-size=SIZE    size of stack per thread [64K]
  --tx-rate=N                 target transaction rate (tps) [0]
  --report-interval=N         periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]#0.5的新增参数(默认值0,表示禁用该功能)在指定的时
首页 上一页 1 2 3 4 下一页 尾页 1/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇11.二叉树基本理论 下一篇?程之美??梯?度算法

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Shell脚本:Linux Sh (2025-12-25 05:50:11)
·VMware虚拟机安装Lin (2025-12-25 05:50:08)
·Linux学习教程,Linu (2025-12-25 05:50:06)
·工业机器人TCP校准中 (2025-12-25 05:19:17)
·opc 通讯协议与 TCP (2025-12-25 05:19:15)