microsoft / diskspd-for-linux

A disk io load-generator and benchmarking tool for Linux, based on the Windows tool diskspd.
MIT License
94 stars 16 forks source link

diskspd-for-linux

Summary

A disk io load-generator and benchmarking tool for Linux, based on the Windows tool diskspd.

Features

Getting Started

Dependencies and System Requirements

Building and installing

Build

    make

Install (to /usr/local/bin)

    make install

Debug build (enables debugging output with d_printf() function):

    make DEBUG=1

You may need to make clean first if you already built diskspd without debugging turned on

Static linking (enables static libraries for binary portability):

    make STATIC=1

Usage

    diskspd [OPTIONS...] FILE [FILE...]

At least one file (or disk) must be specified, along with a number of optional arguments. Don't leave a space between the option and its argument; some arguments are optional and argp doesn't support spaces in this case. To have diskspd create files of a specified size, use -c followed by the file size.

To see the full list of options, use:

    diskspd --help

Examples and tips

By default, diskspd creates a single thread for each file or disk specified and does sequential IO operations starting at offset 0, keeping at most 2 operations in flight at a time per-thread. These operations are offset from each other by the stride (which defaults to the specified block or IO size, which itself defaults to 64K).

The most basic usage of the tool is to simply use -c to create a file to do IO on, and run with the defaults options enabled. This example creates a 1MiB file filled with a repeating pattern and reads from it sequentially until the test is done. The Linux kernel's asynchronous io interface is used to keep at most two operations in flight. A 5 second warmup is followed by 10 seconds of recording results.

    diskspd -c1M testfile

The following example writes directly (without buffering) to the partition /dev/sdc1 without touching the first 1GiB of the disk, using 1MiB blocks. Warm up is only 2 seconds, and results are recorded for 60 seconds. Output latency information and standard deviation for IOPS are displayed. 8 threads are used in total each keeping at most 4 operations in flight at a time, for a total of up to 32 in flight operations at a time.

    diskspd -b1M -B1G -w100 -Sh -W2 -d60 -L -D -t8 -o4 /dev/sdc1

Useful options:

More detailed information about diskspd's usage can be found in the wiki on GitHub.

Planned features

Known issues

Terms of Use

By downloading and running this project, you agree to the license terms of the third party application software, Microsoft products, and components to be installed.

The third party software and products are provided to you by third parties. You are responsible for reading and accepting the relevant license terms for all software that will be installed. Microsoft grants you no rights to third party software.

License

Copyright (c) 2018 Microsoft Corporation. All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.