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

相关文章
|
网络协议 NoSQL Linux
阿里云 Linux 内核优化实战(sysctl.conf 和 ulimits )
一、sysctl.conf优化Linux系统内核参数的配置文件为 /etc/sysctl.conf 和 /etc/sysctl.d/ 目录。其读取顺序为: /etc/sysctl.d/ 下面的文件按照字母排序;然后读取 /etc/sysctl.conf 。
10322 8
|
JSON 前端开发 Java
前端请求SpringBoot接口出现Required request body is missing
前端请求SpringBoot接口出现Required request body is missing
1095 2
|
Ubuntu
Ubuntu系统镜像下载,国内镜像站大全(山大/清华/阿里/浙大/中科大...)
装Ubuntu,是很多理工科同学入门的第一个挑战,首先我们就需要找到一个能用的iso镜像,根据你的网络环境的不同,不同的站点下载速度会不一样,下面列举一下几个比较好用的,都是来自Ubuntu官方推荐镜像站链接导航国内分区
48304 1
|
8月前
|
Prometheus 并行计算 异构计算
containerd 节点 GPU 镜像预热记录
本次在GPU节点复现推理环境时,首遇镜像拉取失败(ImagePullBackOff),Pod卡在ContainerCreating状态。通过`crictl pull`逐源验证并预热vLLM、CUDA、Prometheus及pause镜像,明确分离镜像问题与模型问题,提升排障效率。(239字)
|
关系型数据库 MySQL
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
1634 0
|
消息中间件 Java Kafka
掌握Kafka事务,看这篇就够了
先赞后看,南哥助你Java进阶一大半Kafka事务实际上引入了原子多分区写入的概念,播客画了以下流程图,展示了事务在分区级别如何工作。我是南哥,一个Java学习与进阶的领路人,相信对你通关面试、拿下Offer进入心心念念的公司有所帮助。
827 3
掌握Kafka事务,看这篇就够了
|
监控 Java Linux
Java 性能调优:调整 GC 线程以获得最佳结果
Java 性能调优:调整 GC 线程以获得最佳结果
781 11
|
数据库连接 数据库 Python
信号量(Semaphore)是一个同步工具
信号量(Semaphore)是一个同步工具
777 14
|
存储 Kubernetes 安全
在k8S中,Secret 有哪些使用方式?
在k8S中,Secret 有哪些使用方式?
|
存储 Kubernetes 数据安全/隐私保护
k8s学习--Secret详细解释与应用
Secret 支持四种类型: - **Opaque Secrets**:存储任意类型机密数据,需自行加密。 - **Service Account Token Secrets**:自动管理 API 访问令牌。 - **Docker Registry Secrets**:存储 Docker 私有仓库认证信息。 - **TLS Secrets**:存储 TLS 证书和私钥,用于加密通信。
1569 0