当前位置: 首页 > news >正文

【vdbench】vdbench配置文件参数含义

vdbench配置文件参数含义

      • 一、随机读(random_read)
        • 1.1 fsd (File System Definition) - 文件系统定义
        • 1.2 fwd (File System Workload Definition) - 工作负载定义
        • 1.3 rd (Run Definition) - 运行定义
      • 二、混合读写(random_rw)
        • 2.1 fsd (File System Definition) - 文件系统定义
        • 2.2 fwd(File System Workload Definition) - 工作负载定义
          • 2.2.1 fwd=default(默认参数)
          • 2.2.2 fwd=fwd1(读取测试)
          • 2.2.3 fwd=fwd2(写入测试)
        • 作用
      • 三、 随机写(random_write)
        • 3.1 fsd (File System Definition) - 文件系统定义
        • 3.2 fwd (File System Workload Definition) - 工作负载定义
        • 3.3 rd(Run Definition) - 运行定义
      • 四、顺序读(seq_read)
        • 4.1 fsd(文件系统定义)
        • 4.2 fwd (工作负载定义)
        • 4.3 rd (运行定义)
      • 五、 混合负载(读写并发)小文件顺序I/O(seq_rw)
        • 5.1 文件系统定义 (fsd)
        • 5.2 工作负载定义 (fwd)
          • 5.2.1 默认参数 (fwd=default)
          • 5.2.2 读取任务 (fwd1)
          • 5.2.3 写入任务 (fwd2)
        • 5.3 运行定义 (rd)
      • 六、顺序写(seq_write)
        • 6.1 文件系统定义 (fsd)
        • 6.2 工作负载定义 (fwd)
        • 6.4 运行定义 (rd)

一、随机读(random_read)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Random reads on randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and randomly
* read it. After 'stopafter=100' reads the file is closed and a new
* file is randomly selected.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=fwd1,fsd=fsd1,operation=read,xfersize=4k,fileio=random,
fileselect=random,stopafter=100,threads=8rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
1.1 fsd (File System Definition) - 文件系统定义
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • fsd=fsd1:定义了一个名为 fsd1 的文件系统数据集。
  • anchor=/dir1:测试文件将创建在 /dir1 目录下。
  • depth=1:目录层级深度为 1(仅在 /dir1 下创建文件,不建子目录)。
  • width=1:每层目录下直接存放文件,不创建额外子目录。
  • files=1000:总共创建 1000 个文件。
  • size=128k:每个文件的大小是 128KB。

作用:在 /dir1 下生成 1000 个 128KB 的小文件,用于后续测试。

1.2 fwd (File System Workload Definition) - 工作负载定义
fwd=fwd1,fsd=fsd1,operation=read,xfersize=4k,fileio=random,fileselect=random,stopafter=100,threads=8
  • fwd=fwd1:定义了一个名为 fwd1 的工作负载。
  • fsd=fsd1:使用之前定义的 fsd1 数据集(1000 个 128KB 文件)。
  • operation=read:测试模式是 读取(read)(不是写入或混合读写)。
  • xfersize=4k:每次 I/O 请求的大小是 4KB(模拟小块随机读)。
  • fileio=random:文件内的访问模式是 随机(random)(而非顺序)。
  • fileselect=random:文件选择模式是 随机(random)(从 1000 个文件中随机选一个读)。
  • stopafter=100:每个线程总共执行 100 次 I/O 操作 后停止。
  • threads=8:并发线程数是 8(模拟 8 个客户端同时访问)。

作用:8 个线程并发随机读取 /dir1 下的 1000 个文件,每次读 4KB,每个线程执行 100 次 I/O 后停止。

1.3 rd (Run Definition) - 运行定义
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
  • rd=rd1:定义了一个名为 rd1 的运行任务。
  • fwd=fwd\*:运行所有匹配 fwd* 的工作负载(这里只有 fwd1)。
  • fwdrate=max:以 最大速率 运行测试(尽可能高的 IOPS)。
  • format=yes格式化(重新初始化) 文件系统数据(会清空 /dir1 并重新生成 1000 个 128KB 文件)。
  • elapsed=120:测试总运行时间为 120 秒(2 分钟)。
  • interval=1:每隔 1 秒 输出一次性能统计信息。

作用:运行测试 2 分钟,期间每秒输出一次性能数据(IOPS、吞吐量、延迟等)。

二、混合读写(random_rw)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Random read and write of randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and do random
* reads.  After 'stopafter=100' reads the file is closed and a new
* file is randomly selected.
* An other eight threads will do the same, but only for writes.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=default,xfersize=4k,fileio=random,fileselect=random,threads=8,
stopafter=100
fwd=fwd1,fsd=fsd1,operation=read
fwd=fwd2,fsd=fsd1,operation=writerd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
2.1 fsd (File System Definition) - 文件系统定义
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • fsd=fsd1:定义名为 fsd1 的文件系统数据集。
  • anchor=/dir1:测试文件存放在 /dir1 目录下。
  • depth=1:目录层级深度为 1(不创建子目录)。
  • width=1:每层目录下直接存放文件,不建子目录。
  • files=1000:创建 1000 个文件
  • size=128k:每个文件大小 128KB

作用:在 /dir1 下生成 1000 个 128KB 的小文件,用于后续测试。

2.2 fwd(File System Workload Definition) - 工作负载定义
2.2.1 fwd=default(默认参数)
fwd=default,xfersize=4k,fileio=random,fileselect=random,threads=8,stopafter=100
  • xfersize=4k:每次 I/O 请求大小 4KB(小块随机 I/O)。
  • fileio=random:文件内访问模式为 随机(非顺序)。
  • fileselect=random:从 1000 个文件中 随机选择 文件进行读写。
  • threads=8:每个 fwd 任务使用 8 个线程(并发数)。
  • stopafter=100:每个线程执行 100 次 I/O 操作 后停止(但测试最长运行 elapsed=120 秒)。
2.2.2 fwd=fwd1(读取测试)
fwd=fwd1,fsd=fsd1,operation=read
  • operation=read:测试 读取(Read) 性能。
  • 继承 fwd=default 的参数(4KB 随机读,8 线程,每个线程 100 次 I/O)。
2.2.3 fwd=fwd2(写入测试)
fwd=fwd2,fsd=fsd1,operation=write
  • operation=write:测试 写入(Write) 性能。
  • 继承 fwd=default 的参数(4KB 随机写,8 线程,每个线程 100 次 I/O)。
作用
  • fwd1:8 线程随机读取 /dir1 下的 1000 个文件,每次读 4KB。
  • fwd2:8 线程随机写入 /dir1 下的 1000 个文件,每次写 4KB。

三、 随机写(random_write)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Random writes on randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and randomly
* write it. After 'stopafter=100' writes the file is closed and a new
* file is randomly selected.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=fwd1,fsd=fsd1,operation=write,xfersize=4k,fileio=sequential,
fileselect=random,stopafter=100,threads=8rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
3.1 fsd (File System Definition) - 文件系统定义
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • fsd=fsd1:定义名为 fsd1 的文件系统数据集。
  • anchor=/dir1:测试文件存放在 /dir1 目录下。
  • depth=1:目录层级深度为 1(不创建子目录)。
  • width=1:每层目录下直接存放文件(不建子目录)。
  • files=1000:创建 1000 个文件
  • size=128k:每个文件大小 128KB

作用:在 /dir1 下生成 1000 个 128KB 的小文件,用于写入测试。

3.2 fwd (File System Workload Definition) - 工作负载定义
fwd=fwd1,fsd=fsd1,operation=write,xfersize=4k,fileio=sequential,fileselect=random,stopafter=100,threads=8
  • fwd=fwd1:定义名为 fwd1 的工作负载。
  • fsd=fsd1:使用 fsd1 数据集(1000 个 128KB 文件)。
  • operation=write:测试 写入(Write) 性能。
  • xfersize=4k:每次 I/O 请求大小 4KB(小块写入)。
  • fileio=sequential:文件内访问模式为 顺序(Sequential)(即按顺序写入文件内容)。
  • fileselect=random:从 1000 个文件中 随机选择 目标文件(但写入方式是顺序的)。
  • stopafter=100:每个线程执行 100 次 I/O 操作 后停止。
  • threads=8:并发线程数为 8(模拟 8 个客户端同时写入)。

关键点

  • fileio=sequential + fileselect=random
    • 每个文件内部是顺序写入(如按 0→128KB 的顺序填充)。
    • 但选择哪个文件是随机的(可能反复写同一个文件,也可能跳着写不同文件)。
  • 适用场景
    • 模拟 日志写入(如 Kafka、数据库事务日志,文件内顺序写,但文件间随机选择)。
    • 测试 小块顺序写入的吞吐量(如 4KB 顺序写入性能)。
3.3 rd(Run Definition) - 运行定义
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
  • rd=rd1:定义名为 rd1 的运行任务。
  • fwd=fwd\*:运行所有匹配 fwd* 的工作负载(这里只有 fwd1)。
  • fwdrate=max:以 最大速率 运行(尽可能高的 IOPS/吞吐量)。
  • format=yes格式化(重新初始化) 文件系统数据(清空 /dir1 并重新生成 1000 个 128KB 文件)。
  • elapsed=120:测试总运行时间 120 秒(2 分钟)。
  • interval=1:每隔 1 秒 输出一次性能统计信息。

作用

  1. 准备阶段format=yes):
    • 清空 /dir1,重新生成 1000 个 128KB 的空文件。
  2. 测试阶段
    • 8 个线程并发执行 4KB 顺序写入,每个线程写入 100 次 I/O(但最长运行 120 秒)。
    • 每秒输出一次性能数据(IOPS、吞吐量、延迟等)。

四、顺序读(seq_read)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Sequentially read randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and sequentially
* read it. At EOF a new file is selected.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=fwd1,fsd=fsd1,operation=read,xfersize=4k,fileio=sequential,
fileselect=random,threads=8rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
4.1 fsd(文件系统定义)
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • 作用:在 /dir1 目录下创建 1000 个文件,每个文件 128KB
  • 关键参数
    • depth=1,width=1:单层目录,无子目录。
    • files=1000:文件数量较多,适合测试高并发元数据性能。
    • size=128k:小文件测试,关注存储系统的元数据处理能力。
4.2 fwd (工作负载定义)
fwd=fwd1,fsd=fsd1,operation=read,xfersize=4k,fileio=sequential,fileselect=random,threads=8
  • 核心行为

    • 8 个线程 并发执行 4KB 顺序读取
    • 每个文件内部顺序读取fileio=sequential),但 随机选择文件fileselect=random)。
  • 关键参数

    参数说明测试意义
    operation=read纯读取测试测试存储读取带宽和 IOPS
    xfersize=4k4KB 小块读取模拟数据库索引等小 I/O 场景
    fileio=sequential文件内顺序读最大化磁盘吞吐量
    fileselect=random随机选文件增加元数据压力
    threads=88 并发线程模拟多客户端访问
4.3 rd (运行定义)
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
  • 执行流程
    1. format=yes:先清空 /dir1 并重新生成 1000 个 128KB 文件。
    2. 持续运行 120 秒elapsed=120),每秒输出一次性能数据(interval=1)。
    3. fwdrate=max:以最大速率运行(压测存储极限性能)。

五、 混合负载(读写并发)小文件顺序I/O(seq_rw)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Sequentially read and write randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and sequentially
* read it. At EOF a new file is selected.
* An other eight threads will do the same, but only for writes.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=default,xfersize=4k,fileio=sequential,fileselect=random,threads=8
fwd=fwd1,fsd=fsd1,operation=read
fwd=fwd2,fsd=fsd1,operation=writerd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
5.1 文件系统定义 (fsd)
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • 作用:在 /dir1 目录下创建 1000 个 128KB 的小文件
  • 关键特性
    • 单层目录结构(depth=1, width=1)。
    • 小文件测试(size=128k),重点关注存储系统的 元数据处理能力小文件吞吐量
5.2 工作负载定义 (fwd)
5.2.1 默认参数 (fwd=default)
fwd=default,xfersize=4k,fileio=sequential,fileselect=random,threads=8
  • 全局默认设置
    • xfersize=4k4KB 小块 I/O(模拟数据库/日志类操作)。
    • fileio=sequential文件内顺序访问(但见下方注意事项)。
    • fileselect=random随机选择文件(从 1000 个文件中随机选)。
    • threads=8每个 fwd 任务 8 线程
5.2.2 读取任务 (fwd1)
fwd=fwd1,fsd=fsd1,operation=read
  • 继承默认参数,执行:
    • 8 线程顺序读取(每个线程从随机选择的文件中 顺序读 4KB)。
5.2.3 写入任务 (fwd2)
fwd=fwd2,fsd=fsd1,operation=write
  • 继承默认参数,执行:
    • 8 线程顺序写入(每个线程向随机选择的文件中 顺序写 4KB)。
5.3 运行定义 (rd)
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
  • 执行流程
    1. format=yes:清空 /dir1 并重新生成 1000 个 128KB 文件。
    2. 并发运行 fwd1(读)和 fwd2(写)
      • 总计 16 个线程(8 读 + 8 写)。
      • 每个线程对文件 顺序 I/O,但文件选择是随机的。
    3. 持续 120 秒,每秒输出一次性能数据。

六、顺序写(seq_write)

*
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
**
* Author: Henk Vandenbergh.
** Sequentially write randomly selected files.
*
* 'format=yes' first creates (depth*width*files) 1000 128k files.
* Test then will have eight threads each randomly select a file and sequentially
* write it. At EOF a new file is selected.
*
* Note: the amount of files and the total combined file size in this test
* guarantees that most if not all of the i/o activity is done from cache.
* Increase the amount of files and/or the file size to make sure that some
* real disk i/o activity is done.
*fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128kfwd=fwd1,fsd=fsd1,operation=write,xfersize=4k,fileio=sequential,
fileselect=random,threads=8rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
6.1 文件系统定义 (fsd)
fsd=fsd1,anchor=/dir1,depth=1,width=1,files=1000,size=128k
  • 作用:在 /dir1 目录下创建 1000 个 128KB 的小文件
  • 关键点
    • 单层扁平目录结构(depth=1, width=1)。
    • 小文件测试(size=128k),重点评估:
      • 文件系统元数据性能(如 inode 处理能力)
      • 存储设备的小文件写入吞吐量
6.2 工作负载定义 (fwd)
fwd=fwd1,fsd=fsd1,operation=write,xfersize=4k,fileio=sequential,fileselect=random,threads=8
  • 核心行为

    • 8 个线程并发执行 4KB 顺序写入
    • 每个文件内部顺序写入fileio=sequential
    • 随机选择目标文件fileselect=random,从1000个文件中随机选)
  • 关键参数解析

    参数说明测试意义
    operation=write纯写入测试评估写入带宽和延迟
    xfersize=4k4KB 小块写入模拟日志/数据库类小I/O场景
    fileio=sequential文件内顺序写最大化写入吞吐量
    fileselect=random随机选文件增加目录查找压力
    threads=88并发线程模拟多客户端写入
6.4 运行定义 (rd)
rd=rd1,fwd=fwd*,fwdrate=max,format=yes,elapsed=120,interval=1
  • 执行流程
    1. format=yes:清空 /dir1 并重新生成 1000 个空文件(128KB)。
    2. 持续写入 120秒elapsed=120),每秒输出性能数据(interval=1)。
    3. fwdrate=max:以最大速率压测(测试写入性能极限)。
http://www.lqws.cn/news/455887.html

相关文章:

  • 【工具使用-VScode】VScode如何设置空格和tab键显示
  • .Net Framework 4/C# 数据访问技术(ADO.NET)
  • 一些实用的chrome扩展0x02
  • C#上位机实现报警语音播报
  • VS Code快捷键大全
  • Python OpenCV 模板匹配的一些应用场景和方法思考,浅析KAZE特征匹配对比
  • Windows 10 防火墙 0x8007045b 打不开
  • 数据库 ACID 特性之 -- 原子性 Atomicity
  • 软件架构的发展历程——从早期的单体架构到如今的云原生与智能架构
  • shell学习笔记
  • 领码 SPARK 融合平台赋能工程建设行业物资管理革新——数智赋能,重塑中国模式新范式
  • LeetCode 275.H指数 II
  • RPC - 服务注册与发现模块
  • 【C++】哈希表的实现(开放定址法)
  • 电磁场数值仿真技术及天线设计与应用
  • 协程(C++)
  • 设计模式精讲 Day 9:装饰器模式(Decorator Pattern)
  • HTTP与HTTPS深度解析:从明文传输到安全通信的演进之路
  • flask通过表单自动产生get请求的参数、form表单实现POST请求的自动提交
  • 轻量级web开发框架之Flask web开发框架学习:get请求数据的发送
  • HCIP-数据通信基础
  • FFmpeg 超级详细安装与配置教程(Windows 系统)
  • Java八股文——消息队列「场景篇」
  • OSI网络通信模型详解
  • linux操作系统---小白玩转shell脚本
  • Clang Static Analyzer 使用教程:本地 + CMake + GitHub Actions 自动静态分析实战
  • Vulkan官方教程(一)
  • 服务器手动安装并编译R环境库包:PROJ→RGDAL
  • Spring AI 项目实战(九):Spring Boot + Spring AI Tools + DeepSeek 进阶实战——调用第三方系统(附完整源码)
  • 小白的进阶之路系列之十七----人工智能从初步到精通pytorch综合运用的讲解第十部分