Benchmark
sudo smartdisk bench disk4bench measures four things, one request at a time (queue depth 1, like real-world copying and
opening files), 5 seconds each (-seconds N, 1 to 60):
| Test | Block | Where |
|---|---|---|
| Sequential read | 1 MiB | The raw disk, read-only |
| Random read 4K | 4 KiB at random positions | The raw disk, read-only |
| Sequential write | 1 MiB | A test file on a mounted volume of the disk |
| Random write 4K | 4 KiB | Inside that test file |
No data on the disk is touched. The writes go to a hidden test file (a quarter of the free space, at most 1 GiB) on the volume with the most free space. They bypass the system cache and use random data, so compressing SSDs cannot cheat, and the file is removed afterwards.
Without a mounted volume, or with -no-write, only the read tests run.
For USB disks smartdisk says when the connection, not the drive, sets the speed, for example a fast SSD on a USB 2.0 port.