Sysbench使用之二fileio

简介: 源码编译的安装步骤如下

源码安装

安装方法参见: https://github.com/akopytov/sysbench

源码编译的安装步骤如下:


yum -y install make automake libtool pkgconfig libaio-devel  openssl-devel
wget https://github.com/akopytov/sysbench/archive/master.zip
unzip master.zip 
cd sysbench-master/
./autogen.sh 
./configure  --without-mysql
 make -j
 make install


没有安装mysql,所以要用–without-mysql。


fileio 测试

# sysbench fileio help
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
fileio options:
  --file-num=N                  number of files to create [128]
  --file-block-size=N           block size to use in all IO operations [16384]
  --file-total-size=SIZE        total size of files to create [2G]
  --file-test-mode=STRING       test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
  --file-io-mode=STRING         file operations mode {sync,async,mmap} [sync]
  --file-async-backlog=N        number of asynchronous operatons to queue per thread [128]
  --file-extra-flags=[LIST,...] list of additional flags to use to open files {sync,dsync,direct} []
  --file-fsync-freq=N           do fsync() after this number of requests (0 - don't use fsync()) [100]
  --file-fsync-all[=on|off]     do fsync() after each write operation [off]
  --file-fsync-end[=on|off]     do fsync() at the end of test [on]
  --file-fsync-mode=STRING      which method to use for synchronization {fsync, fdatasync} [fsync]
  --file-merged-requests=N      merge at most this number of IO requests if possible (0 - don't merge) [0]
  --file-rw-ratio=N             reads/writes ratio for combined test [1.5]


# sysbench fileio prepare
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
128 files, 16384Kb each, 2048Mb total
Creating files for the test...
...
Creating file test_file.127
2147483648 bytes written in 4.26 seconds (481.08 MiB/sec).


飞腾机器测试顺序写大约400M/S:


# sysbench fileio  --file-test-mode=seqwr run
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...
Threads started!
Throughput:
         read:  IOPS=0.00 0.00 MiB/s (0.00 MB/s)
         write: IOPS=25040.09 391.25 MiB/s (410.26 MB/s)
         fsync: IOPS=32061.56
Latency (ms):
         min:                                  0.00
         avg:                                  0.02
         max:                                 55.21
         95th percentile:                      0.05
         sum:                               9695.04
[root@localhost infokist]#

这是一个由11个sata盘组成的RAID 6的磁盘整列。


# sysbench fileio  --file-test-mode=rndrd run
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 16MiB each
2GiB total file size
Block size 16KiB
Number of IO requests: 0
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
Initializing worker threads...
Threads started!
Throughput:
         read:  IOPS=19340.10 302.19 MiB/s (316.87 MB/s)
         write: IOPS=0.00 0.00 MiB/s (0.00 MB/s)
         fsync: IOPS=0.00
Latency (ms):
         min:                                  0.01
         avg:                                  0.05
         max:                                  0.25
         95th percentile:                      0.07
         sum:                               9828.43



只读的iops将近2万

测试完成要删除用于测试的文件

# sysbench fileio  cleanup
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)
Removing test files...


其他测试

# sysbench threads run

# sysbench memory run

# sysbench cpu run

# sysbench mutex run

相关文章
|
应用服务中间件 nginx 数据安全/隐私保护
HAProxy的高级配置选项-配置haproxy的状态页
这篇文章详细介绍了如何配置HAProxy的状态页,包括隐藏版本信息、设置自动刷新时间、自定义访问URI、配置认证信息以及启用管理功能等,并通过实战案例展示了配置过程和效果。
598 5
HAProxy的高级配置选项-配置haproxy的状态页
|
6月前
|
传感器 算法 安全
机器人路径规划和避障算法matlab仿真,分别对比贪婪搜索,最安全距离,RPM以及RRT四种算法
本程序基于MATLAB 2022A实现机器人路径规划与避障仿真,对比贪婪搜索、最安全距离、RPM和RRT四种算法。通过地图模拟环境,输出各算法的路径规划结果,展示其在避障性能与路径优化方面的差异。代码包含核心路径搜索逻辑,并附有测试运行图示,适用于机器人路径规划研究与教学演示。
723 64
|
7月前
|
缓存 编解码 算法
Netty源码—6.ByteBuf原理一
本文深入探讨了Netty中ByteBuf的使用与内存管理机制。主要内容包括ByteBuf的问题整理、结构及重要API、ByteBuf的分类及其补充说明。此外,还详细分析了内存分配器ByteBufAllocator的功能,包括其两大子类UnpooledByteBufAllocator和PooledByteBufAllocator的实现原理,尤其是PooledByteBufAllocator通过PoolArena进行内存分配的具体流程。最后,总结了ByteBuf的主要内容分为内存抽象、分配策略和回收过程三大方面,为高效使用ByteBuf提供了理论基础。
|
运维 Serverless PyTorch
函数计算产品使用问题之ComfyUI除了通过WebUI页面进行,还有什么其他方法部署
函数计算产品作为一种事件驱动的全托管计算服务,让用户能够专注于业务逻辑的编写,而无需关心底层服务器的管理与运维。你可以有效地利用函数计算产品来支撑各类应用场景,从简单的数据处理到复杂的业务逻辑,实现快速、高效、低成本的云上部署与运维。以下是一些关于使用函数计算产品的合集和要点,帮助你更好地理解和应用这一服务。
|
SQL 监控 安全
【阿里云云原生专栏】云原生安全体系构建:阿里云云防火墙与WAF的应用
【5月更文挑战第27天】阿里云云防火墙和WAF是构建云原生安全体系的关键产品,提供网络、主机和Web应用多维度防护。云防火墙采用分布式架构抵御网络攻击,确保应用安全稳定;WAF专注Web应用安全,防止SQL注入、XSS和DDoS等威胁。简单部署配置,结合使用可实现全面安全防护,提升企业云上应用安全性,保障业务安全运行。未来,阿里云将持续强化云原生安全建设。
691 1
|
负载均衡 网络协议 算法
|
存储 算法 NoSQL
(三)漫谈分布式之集群篇:探寻N个9高可用与PB级数据存储的实现原理!
本文来详细聊聊集群的各方面知识,为诸位量身打造出结构化的集群知识体系。
629 0
|
C语言 Python
exit、quit、sys.exit、os._exit,这么多退出方式,它们之间有什么区别呢?
exit、quit、sys.exit、os._exit,这么多退出方式,它们之间有什么区别呢?
612 0
|
数据采集 NoSQL MongoDB
使用多进程和 Scrapy 实现高效的 Amazon 爬虫系统
在这篇博客中,将展示如何使用多进程和 Scrapy 来构建一个高效的 Amazon 爬虫系统。通过多进程处理,提高爬虫的效率和稳定性,同时利用 Redis 进行请求调度和去重。
|
Ubuntu 固态存储
如何在 Ubuntu 20.04 上添加交换空间?
如何在 Ubuntu 20.04 上添加交换空间?
432 0
如何在 Ubuntu 20.04 上添加交换空间?