DriveSpeed! (v4) - a 'dd'-based drive speed tester - .pet & 'portable'
DriveSpeed!
Afternoon, gang.
I got the idea for this from playing around, and 'tinkering' with BK's 'EasyDD' script, for which I put some packages together a couple of years ago. One thing I noticed about the script was that when writing the ISO .img file to the drive, it also gave an on-going, 'live' readout of the drive's write speed as it happened. I thought this was quite useful; I know you can do all sorts of things with 'dd', so I decided to look into using this function - along with a 'read' version - as part of a 'speed tester' utility.
Further 'head-scratching' ensued from this thread:-
Some scouting around the 'net brought up this page from BlackmoreOps:-
https://www.blackmoreops.com/2017/04/04 ... -in-linux/
.....which provided some very useful information. Along with studying BK's 'easydd' script, I sooner or later had a bunch of wee scripts fleshed out for checking read/write speeds of a flash drive, along with a YAD-powered GUI for controlling it all!
--------------------------------------------------
This should work with any 'external' drive; USB-flash, USB HDD, USB SSD, SD cards, zip drives.....you name it; if 'dd' can write to/read from it, DriveSpeed! will work.
By means of Fred's 'readlink' trick - which I've used extensively in my other portable applications - DriveSpeed! can be used anywhere. Download it; unzip it. Copy it to ANY drive you wish to test read/write speeds of; the 'testfile' will be created in-situ, so really, anywhere on the drive will do. The initial test will be the write-test; DriveSpeed! will create a 'dummy' file of 1 GB in size, called 'testfile', using the 'dev/zero' function of 'dd'. By making use of the 'status=progress' flag, along with a couple of others, a wee RXVT terminal window opens, showing progress of the operation along with a real-time 'speed' display of the data transfer.
The subsequent test is then the read-test. DriveSpeed! reads the contents of the 'testfile', and dumps it into the black hole of /dev/null as it does so. Again, a wee RXVT terminal window monitors progress, and keeps you informed.
You can run these tests with a choice of 'block sizes'; I've chosen 'bs=256k", "bs=512K", and "bs=1M" for this. You don't have to stick with the same block size for both tests; if you wish, you can choose different ones.
------------------------------------
PLEASE REMEMBER:- Clear the drive's cache buffers by use of the 'CLEAR BUFFERS' button between tests. This helps to give a more accurate representation of the drives caching performance; it's beneficial to start with a "clean slate" for each run!
An 'explainer' is available from the 'HELP' button at any time.
-----------------------------------
DriveSpeed! is NOT intended to be an exhaustive drive test utility. Its sole purpose is to test drive read/write speeds, and that's what it does. It's probably not up to some of your standards, but don't get on to me, guys; it follows the Linux mantra of doing one thing only, yet attempting to do it as well as possible.
I've tested this with quite a collection of USB 2.0 & USB 3.0 drives, in both USB2 & USB3 ports, across a selection of Puppies of both 'arches'. It functions quite happily, since it's simply making use of your existing 'dd' binary.
I've attached the tarball to the bottom of this post.
EDIT:- (05/05/21) - New version v3 released. Improvements include partition selection/mount facility, and auto-scanning for all available partitions on the system before populating the combo-box "drop-down".
EDIT:- (06/05/21) - New version v4 released. As above; additions include progress window now within the GUI; you can abort the test early, and clear the data - handy if you have very slow drives and just want to run long enough to get a meaningful readout.
See HERE for details. Thanks to stemsee for the additions.
EDIT:- (08/05/21) - Final versions of v4. Also, a slightly-modified v2.1, with contributions from the other 'Mike' in this thread.
-------------------------------------
This is the first time, I think, that I've attempted to build a utility from the ground up. Feedback will be appreciated; constructive criticism is welcome.....criticism purely for the sake of criticism, not so much.
Let me know what ya think, please, kiddiwinks.
Mike.