This check makes the same random reads as random reads in a shared
folder
, but on the container's own storage. It
represents a database or cache that keeps its data inside the container. fio
writes a 1 GB file, then makes 25 000 reads of 4 KB each at random locations.
Writing the file is part of the timed command, as it was for the published
number. The result is the wall-clock time of the single docker run command on
your machine.
For how durations are taken and how to repeat a check, see Performance checks .
Set up
$ mkdir -p ~/perfcheck/randread-container && cd ~/perfcheck/randread-container
$ printf 'FROM alpine:3.24.1\nRUN apk add --no-cache fio=~3.41\n' | docker build -t perfcheck/fio:3.41 -
$ docker run --rm perfcheck/fio:3.41 fio --version
fio-3.41
Run the check
Run the timed command:
$ time docker run --rm perfcheck/fio:3.41 \ fio --name=randread --filename=/tmp/test.img --rw=randread --bs=4k \ --ioengine=psync --number_ios=25000 --size=1G --invalidate=1Record the elapsed time.
Check that the run is valid. The
issued rwts:line must start withtotal=25000,0,0. Docker removes the container and its file when it exits, so there's nothing to clean up.