Storage benchmarks answer a specific workload question. A cached read result, a queue-depth-32 random test, and a database commit latency are different measurements.
Start with a modest file test on the intended filesystem. Record conditions before changing hardware or tuning properties.
Verification status
| Area | Evidence and limits |
|---|---|
| Technical review | fio, Docker and OpenZFS references reviewed on October 31, 2026. |
| Static checks | Bash syntax and result-path structure checked. |
| Runtime | No fio workload, storage modification, NFS test or container benchmark executed for this revision. |
| Scope | Proposed buffered, single-job filesystem baseline; not a raw-device or durable-transaction benchmark. |
1. Identify the path and workload
On Debian or Ubuntu:
|
|
Confirm this is the Flexible I/O Tester, not another executable with the same name. Choose an existing writable test directory on the desired mount, with free space and no production data that the test should touch.
Avoid a default /tmp target: it might be memory-backed or on a different disk. For external mounts, verify the expected source is actually mounted before creating test files. Run during an agreed maintenance window; even a file-based workload competes with other users.
Write down the question: sequential file transfer, random reads, application commits, or concurrent clients. The small demo below measures only the first two under buffered conditions.
2. Create a bounded baseline script
The script requires an explicit directory. It writes a 256 MiB preparation file in a newly created subdirectory, then reads that file. It never accepts a raw block-device target.
|
|
Review free space before running; the script does not enforce a capacity threshold. The 15-second read phase is bounded in time, while preparation and flush duration depend on storage. Stop and investigate errors rather than disabling durability or changing production properties to obtain a number.
The preparation write uses fresh buffers rather than a zero-filled dd stream. The read jobs cannot create missing test files. Each result is one JSON document; context text stays separate.
The synchronous engine runs one request at a time here. Raising iodepth with this engine would not create the same concurrency as an asynchronous engine. See the fio reference for option semantics.
3. Read results without inventing expectations
This is deliberately buffered and cache-aware: the preparation may warm caches, and the read working set is small. Read throughput may therefore describe memory or filesystem cache behavior rather than physical disk speed. It is not a cold-cache hardware comparison.
Inspect the saved JSON and verify units. Bandwidth, operation rate, and completion latency describe different aspects of the test. Percentiles are nested in the latency structure produced by the installed fio version; do not assume invented p50/p99 top-level keys.
Record errors and variability alongside headline throughput. Compare repeated runs with the same file size, cache policy, engine, block size, concurrency and background load. Keep preparation results separate from steady-state claims.
Do not convert one random-I/O rate directly into application INSERT latency or promise a universal throughput target for media streams. Validate representative application behavior too.
4. Adapt by storage type
| Path | Additional evidence to record |
|---|---|
| Local filesystem | Device, filesystem, mount options, free space and competing workloads |
| ZFS | Pool layout, properties, ARC behavior, dataset versus zvol, and installed OpenZFS version |
| NFS | Actual mount source/options, client and server load, network path and server cache |
| Docker bind mount or volume | Backing filesystem, mount type, cgroup limits, image and tools used |
Direct I/O support and behavior depend on the filesystem and version. Do not assume direct=1 bypasses every cache, especially across ZFS or network storage. Keep buffered and supported direct-I/O tests as separately labelled experiments.
For ZFS, inspect properties before tuning. Do not change sync, recordsize or compression on a live production dataset as a benchmark step. The sync property defaults to standard, not always. See OpenZFS properties.
Docker named volumes and bind mounts are distinct from the container writable layer; they do not inherently traverse overlay2. Use a new disposable volume for a container comparison, not a running database’s storage. Compare equivalent backing storage and conditions. See Docker volumes.
5. Diagnose before buying or tuning
Watch host and storage activity during a separate run, for example with iostat, and correlate it with application latency and errors. Investigate mount selection, thermal behavior, queueing and competing jobs before blaming the disk model.
Benchmarking is not disk-health validation or a backup test. Review the disk-health guide and protect recoverable data before stressing suspect storage.
Retain JSON results and context for comparison. When finished, remove only the exact disposable run directory printed by the script after inspecting its contents. No raw-device write, global cache drop, pool-property change or automatic deletion is included.
Continue reading
- ZFS snapshots and recovery — Understand dataset and guest-storage boundaries.
- Docker Compose patterns — Document mounts and resource constraints.