Zerk Zone

Pages for the Creations of Ryan Armstrong

Disk Benchmarking Script

Posted on May 5th, 2019 @ 7:03 am by Zerker

This script exists to serve a simple purpose: benchmark a disk and store the results in an easy-to-use CSV format. The script will write and read a variety of block sizes to the specified location, which will gather similar statistics to the ATTO Disk Benchmark tool on Windows. The maximum file size can also be specified, in order to benchmark small file systems. Here are some sample results, benchmarking floppy disks:

This particular script is only compatible with Unix-like OSes. It assumes that /dev/zero and /dev/null are valid filesystem paths, and it relies on dd to perform the actual benchmark. It also requires Python 3.5.

Download: benchdisk.gz (1.4 kb)

To install, simply uncompress, mark as executable and copy to any location on your system path. Typically, this will be one of /usr/local/bin, ~/bin or ~/.local/bin, depending on system setup.

Usage

benchdisk [-h] [-s SIZE] [-o OUTPUT] filename

Benchmarks the specified disk.

positional arguments:

filename
Filename for a temporary file to benchmark with. Should NOT already exist.

optional arguments:

-h, –help
show this help message and exit
-s SIZE, –size SIZE
Maximum filesize to benchmark against, in megabytes.
-o OUTPUT, –output OUTPUT
Output filename.

Comments (0)

Filed under: Linux,Programs/Libraries,Python |

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment