Git Product home page Git Product logo

disktest's Introduction

disktest

a quick and dirty multithreaded read/write seek test

This tool works only with gcc/Linux.

The test reads or writes small random data (default 4KB) to block aligned seeks of a specified file or device.

usage: disktest [options] [-rwRWt] <device or file>
        -b [bytes]      block size (default 4K)
        -o [bytes]      offset into block (default 0)
        -s [bytes]      size to read/write (default 4K)
        -r [threads]    num read threads
        -w [threads]    num write threads
        -R [count]      total number of reads to do (across all threads)
        -W [count]      total number of writes to do (across all threads)
        -t [seconds]    time to run
        -S [bytes]      seek range limit (default is the size of the file/device)
        -d              debug on
        -D              use O_DIRECT (bypass page cache)
        -h              help

To test a file system, create a large file first. e.g. for 500 GB:

dd if=/dev/zero of=/data/mytestfile bs=4096 count=131072000

Examples:

Read seek test with 32 threads, running for 30 seconds, bypass page cache:

disktest -r 32 -t 30 -D /data/mytestfile

Do 8000 read seeks with 10 threads:

disktest -R 8000 -r 10 /data/mytestfile

Run 32 read threads and 1 write thread on the device (device data will be trashed!):

disktest -r 32 -w 1 -t 60 /dev/sdb

Seek within only the first 1 GB of the file/device

disktest -r 32 -S 1000000000 -t 30 /data/mytestfile

Authors:

  • Steve Jiang (@sjiang) (email: gh at iamsteve.com)

License

disktest is licensed under the Apache License Version 2.0

disktest's People

Contributors

sjiang avatar

Watchers

James Cloos avatar

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.