sysbench 测试IOPS
2015-12-27 00:00
477 查看
1、选择测试的磁盘
2、测试命令,生成测试文件
3、测试
4、注意事项:
[root@166087 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/simfs 150G 32G 119G 22% / none 1.0G 4.0K 1.0G 1% /dev none 1.0G 0 1.0G 0% /dev/shm
2、测试命令,生成测试文件
[root@166087 ~]# mkdir sysbench_test [root@166087 ~]# sysbench --test=fileio --file-num=4 --file-total-size=10G --file-block-size=16384 --file-test-mode=rndrd --max-requiest=0 --max-time=3600 --num-threads=16 prepare sysbench: /usr/lib64/libmysqlclient.so.18: no version information available (required by sysbench) sysbench 0.5: multi-threaded system evaluation benchmark 4 files, 2621440Kb each, 10240Mb total Creating files for the test... Extra file open flags: 0 Creating file test_file.0 Creating file test_file.1 Creating file test_file.2 Creating file test_file.3 10737418240 bytes written in 50.91 seconds (201.13 MB/sec).
3、测试
[root@166087 ~]# sysbench --test=fileio --file-num=4 --file-total-size=10G --file-block-size=16384 --file-test-mode=rndrd --max-request=0 --max-time=3600 --file-extra-flags=direct --num-threads=16 --report-interval=3 run sysbench: /usr/lib64/libmysqlclient.so.18: no version information available (required by sysbench) sysbench 0.5: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 16 Report intermediate results every 3 second(s) Random number generator seed is 0 and will be ignored Extra file open flags: 3 4 files, 2.5Gb each 10Gb total file size Block size 16Kb Number of IO requests: 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 read test Threads started! Operations performed: 10000 reads, 0 writes, 0 Other = 10000 Total Read 156.25Mb Written 0b Total transferred 156.25Mb (3.3248Gb/sec) 217895.03 Requests/sec executed #IOPS General statistics: total time: 0.0459s total number of events: 10000 total time taken by event execution: 0.2083s response time: min: 0.00ms avg: 0.02ms max: 13.86ms approx. 95 percentile: 0.01ms Threads fairness: events (avg/stddev): 625.0000/444.87 execution time (avg/stddev): 0.0130/0.01
4、注意事项:
测试时间要够长几天一周的样子,测试文件要够大。至少硬盘容量的60-%80%。 如果是测试数据库的写入, --file-block-size=16384 应该设置数据库的 innodb_page_size 大小 清除测试文件 sysbench --test=fileio --file-num=4 --file-total-size=10G --file-block-size=16384 --file-test-mode=rndrd --max-requiest=0 --max-time=3600 --num-threads=16 cleanup
相关文章推荐
- 13.Linux之软件安装
- Linux下MySQL C API简单示例
- 云服务器CentOS6.5搭建jdk7+tomcat7+mysql5.6环境
- 用kalinux 下面的mitmproxy 工具查看请求的时候会发现请求一个symcd.com
- Tomcat 环境配置
- Linux中程序包管理
- shell处理字符串的基本命令
- 基于linux-2.6.38.8内核的SDIO/wifi驱动分析
- linux下面搭建apache+php+mysql环境
- Linux + C + Epoll实现高并发服务器(线程池 + 数据库连接池)
- Linux监控工具介绍系列——smem
- Linux netstat命令详解
- BeanUtils.populate的作用
- linux service命令
- opencv CvArr、Mat、CvMat、IplImage、BYTE之间的转换
- linux 查看elf相关命令
- Linux Netlink通信机制详解
- shell变量替换技术实践与生产实践
- phpmyadmin 各种技巧拿 webshell
- Linux环境下安装部署AWStats日志分析系统实例