e7db/diskmark
A fio-based docker container to benchmark your disks, similar to what CrystalDiskMark does.
10K+
A fio-based disk benchmark docker container, similar to what CrystalDiskMark does.
docker pull e7db/diskmark
docker run -it --rm e7db/diskmark
The container contains two different test profiles:
Find below a table listing all the different parameters you can use with the container:
Parameter | Type | Default | Description |
---|---|---|---|
PROFILE | Environment | auto | The profile to apply: - auto to try and autoselect the best one based on the used drive detection,- default , best suited for hard disk drives,- nvme , best suited for NMVe SSD drives. |
JOB | Environment | A custom job to use: details below in the Custom job section. This parameter overrides the PROFILE parameter. | |
IO | Environment | direct | The drive access mode: - direct for synchronous I/O,- buffered for asynchronous I/O. |
DATA | Environment | random | The test data: - random to use random data,- 0x00 to fill with 0 (zero) values. |
SIZE | Environment | 1G | The size of the test file in bytes. |
WARMUP | Environment | 0 | When set to 1 , use a warmup phase, thus preparing the test file with fallocate , using either random data or zero values as set by DATA . |
RUNTIME | Environment | 5s | The test duration for each job. |
LOOPS | Environment | The number of test loops performed on the test file. This parameter overrides the RUNTIME parameter. | |
/disk | Volume | The target path to benchmark. |
By default, a 1 GB test file is used, with a 5 seconds duration for each test, reading and writing random bytes on the disk where Docker is installed.
For example, you can use a 4 GB file, looping each test twice, but after a warmup phase, and writting only zeros instead of random data.
You can achieve this using the following command:
docker run -it --rm -e SIZE=4G -e WARMUP=1 -e LOOPS=2 -e DATA=0x00 e7db/diskmark
A detection of your disk is tried, so the benchmark uses the appropriate profile, default
or nvme
.
In the event that the detection fails, yielding "Unknown", or returns the wrong profile, you can force the use of either of the profiles:
docker run -it --rm -e PROFILE=nvme e7db/diskmark
You can run a custom single job using the JOB
parameter.
The job expression must follow a specific format, such as follows: RND4KQ32T16
.
It is composed of 4 parts:
RND
or SEQ
, for random or sequential accessxxK
or xxM
, where xx
is the block size, and K
or M
is the unit (Kilobytes or Megabytes)Qyy
, where yy
is the queue depthTzz
, where zz
is the number of threadsIn the previous example RND4KQ32T16
, the job uses random accesses, with a block size of 4K, a queue depth of 32, and 16 threads.
Construct your custom chain, then run the benchmark using the following command:
docker run -it --rm -e JOB=RND4KQ32T16 e7db/diskmark
By default, the benchmark runs on the disk where Docker is installed, using a Docker volume mounted on the /disk
path inside the container.
To run the benchmark on a different disk, use a path belonging to that disk, and mount it as the /disk
volume:
docker run -it --rm -v /path/to/specific/disk:/disk e7db/diskmark
docker pull e7db/diskmark