当前位置: 首页 > 工具软件 > DISKSPD > 使用案例 >

19.Veeam B&R 19 DiskSpd模拟磁盘操作测试性能

吕衡
2023-12-01

请注意,与所有综合基准测试一样,实际结果可能会有所不同。

DiskSpd是Microsoft的Windows,Windows Server和Cloud Server Infrastructure工程团队的一种存储性能工具,将强大,精细的IO工作负载定义与灵活的运行时和输出选项结合在一起,为合成存储子系统的测试和验证创建了理想的工具。

官方地址:https://github.com/Microsoft/diskspd

diskspd命令语法:


diskspd [options] target1 [ target2 [ target3 …] ]

  • Target 目标 (可以指定多个目标来模拟同时运行多个作业。)
    – 指定盘符上的文件:d:\testfile.dat
    – 在CIFS文件/SMB共享:\fileserver\share\testfile.dat
    – NFS共享上的文件:N:\testfile.dat
    – 磁盘:#X 其中X是数字磁盘管理中的磁盘。在这种模式下diskspd直接从磁盘读取或写入磁盘(“RAW”),因此会对磁盘数据造成影响。
  • -b 指定读取或写入操作的Block size块大小。此项与存储优化选项Storage Optimization设置有关;它将在一定情况之下影响磁盘读写性能;默认值建议为512K => Local target 1MB。
  • -c 指定需要为测试创建的File size文件大小
  • -d 指定测试的持续时间。默认情况下,它会进行5秒的预热(不收集统计数据),然后再进程10秒的测试。通常指定为 600秒。
  • -Sh 禁用Windows和硬件缓存,此标记必须始终设置。Veeam Agent始终明确禁用I/O操作的缓存以提高可靠性,即使这会导致速度降低。

diskspd常见用法:


Active full or forward incremental 主动完整备份或永久增量

diskspd.exe -c1G -b512K -w100 -Sh -d600 D:\testfile.dat

-w100 表示100%写入和0%读取。默认情况下使用顺序I / O。

Reverse incremental 反向增量

diskspd.exe -c1G -b512K -w67 -r4K -Sh -d600 D:\testfile.dat

-w67 表示67%写入和33%读取,以模拟在反向增量备份作业中发生的2次写入和1次读取操作。
-r4K 支持4KB对齐的随机I / O,以实现更逼真的仿真效果。

Transforms, merges, and other synthetic operations转换,合并和其他合成操作
包括将增量转换为回滚,合并永久前向增量备份和备份复制作业中的操作,以及创建合成完整备份文件和GFS点。

diskspd.exe -c1G -b512K -w50 -r4K -Sh -d600 D:\testfile.dat

-w50 表示50%写入和50%读取,以模拟从一个文件读取数据并将数据写入另一个(或者在转换的情况下,从两个文件中读取与写入另外两个文件相同数量的块)。
-r4K 支持4KB对齐的随机I / O,以实现更逼真的仿真效果。

慢速恢复或恢复备份
通常是在使用次优设置从重复数据删除设备还原时。作为慢速恢复的一种解决方法,请手动将备份文件复制到其他位置(例如Veeam服务器),然后从那里导入和恢复。

diskspd.exe -b512K -r4K -Sh -d600 \\nas\share\VeeamBackups\Job\Job2014-01-23T012345.vbk

你需要选择一个现有的.vbk文件作为目标。仅执行读取操作。


diskspd输出结果参考:


Command Line: diskspd.exe -c1G -b512K -w100 -Sh -d600 c:\testfile.dat

Input parameters:

        timespan:   1
        -------------
        duration: 600s
        warm up time: 5s
        cool down time: 0s
        random seed: 0
        path: 'c:\testfile.dat'
                think time: 0ms
                burst size: 0
                software cache disabled
                hardware write cache disabled, writethrough on
                performing write test
                block size: 524288
                using sequential I/O (stride: 524288)
                number of outstanding I/O operations: 2
                thread stride size: 0
                threads per file: 1
                using I/O Completion Ports
                IO priority: normal

System information:

        computer name: ZServer01
        start time: 2020/02/04 13:58:49 UTC

Results for timespan 1:
*******************************************************************************

actual test time:       600.00s
thread count:           1
proc count:             1

CPU |  Usage |  User  |  Kernel |  Idle
-------------------------------------------
   0|  18.26%|   6.53%|   11.73%|  81.74%
-------------------------------------------
avg.|  18.26%|   6.53%|   11.73%|  81.74%

Total IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  file
------------------------------------------------------------------------------
     0 |    143467216896 |       273642 |     228.03 |     456.07 | c:\testfile.
dat (1024MiB)
------------------------------------------------------------------------------
total:      143467216896 |       273642 |     228.03 |     456.07

Read IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  file
------------------------------------------------------------------------------
     0 |               0 |            0 |       0.00 |       0.00 | c:\testfile.
dat (1024MiB)
------------------------------------------------------------------------------
total:                 0 |            0 |       0.00 |       0.00

Write IO
thread |       bytes     |     I/Os     |    MiB/s   |  I/O per s |  file
------------------------------------------------------------------------------
     0 |    143467216896 |       273642 |     228.03 |     456.07 | c:\testfile.
dat (1024MiB)
------------------------------------------------------------------------------
total:      143467216896 |       273642 |     228.03 |     456.07

参考资料:
KB2014: 如何使用DiskSpd模拟Veeam备份和复制磁盘操作
https://www.veeam.com/kb2014

 类似资料: