Giter Site home page Giter Site logo

fio-cdm's Introduction

fio-cdm

A python script to generate CrystalDiskMark-style test result with fio. Should work across multi platforms.

This is still WIP and I am not familiar with fio, so the test result is expected to be imprecise. Correction and advices are welcome.

Requirement

  • fio
  • python
  • configparser module for python2

Feature

  • Provide some options of CrystalDiskMark, e.g., number of test runs, test file size, mixed r/w tests, zero buffers, etc
  • Show IOPS and latency results for random read/write tests. This actually combines the "default", "peak performance" and "real world performance" tests in CrystalDiskMark
  • Easy to add/customize new tests in command-line arguments
  • Parse fio result in json format to achieve more stability

Usage

usage: fio-cdm [target] [-h] [-0] [-a job] [-E] [-f jobfile] [-n number] [-s size] [-x [mix]]

positional arguments:
  target      The path of the directory to test. Default to current directory.

optional arguments:
  -h, --help  show this help message and exit
  -0          Initialize buffers with zeros. Default to use random buffers.
  -a job      Manually add multiple jobs. Format is "seq|rnd,<queue depth>,<thread number>".
              This overrides the preset jobs. This option can be used more than once.
  -E          Disable extra information (iops, latency) for random IO tests. Default is enabled.
  -f jobfile  Save jobfile and quit without running fio. Use "-" to print to stdout.
  -n number   Number of tests, default is 5.
  -s size     The size of file I/O. It is directly passed to fio. Default is 1G.
  -x [mix]    Add mixed rw test. Default is disabled. <mix> is read percentage. Default is 70.

Note:
Recommend to put the <target> argument as the first one since some of the optional arguments will consume it.

Sample output

The default tests are same as CrystalDiskMark

tests: 5, size: 1G, target: . 173.3GiB/405.1GiB
|Name        | Read(MB/s)|Write(MB/s)|  Mix(MB/s)|
|------------|-----------|-----------|-----------|
|SEQ1M Q8 T1 |    2997.60|    2056.19|    1438.19|
|SEQ1M Q1 T1 |    1986.94|    1461.67|     941.04|
|RND4K Q32T16|    1816.04|     456.98|     434.18|
|... IOPS    |  443350.17|  111546.75|  105987.62|
|... latency |    1153.89|    4587.90|    2800.43|
|RND4K Q1 T1 |      54.20|     164.86|      34.43|
|... IOPS    |   13232.15|   40248.87|    8405.20|
|... latency |      74.76|      23.04|      67.78|

Examples

Set test file size to 512MB, 5 test runs with read, write and mix tests:

fio-cdm -s 512m -n 5 -x

Manually add jobs to replace the default ones:

fio-cdm -a seq,1,1 -a seq,32,1 -a rnd,16,8

Show the equivalent fio command directly (without running the test):

fio-cdm -f - | fio --showcmd -

Similar projects

Shell version: https://github.com/buty4649/fio-cdm

fio-cdm's People

Contributors

xlucn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fio-cdm's Issues

it can not work in windows, reported "fio: D is not a directory"

Run fio -v
  fio -v
  python[3](https://github.com/james-curtis/fio-cdm/actions/runs/3625681230/jobs/6113979589#step:4:3) fio-cdm -s 1m
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
fio-3.13
fio: D is not a directory
fio: failed parsing directory=D:\a\fio-cdm\fio-cdm
fio: job global dropped
tests: 5, size: 1.0MiB, target: D:\a\fio-cdm\fio-cdm 1.8GiB/1[4](https://github.com/james-curtis/fio-cdm/actions/runs/3625681230/jobs/6113979589#step:4:4).0GiB

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.