A combination of nrfiles, openfiles and file_service_type does not work as expected (at least from my perspective). I looks like fio considers only open files when choosing the next file to process. This may also be related to #1676, #1677.
Fio has similar (unexpected) behavior with other file_service_type modes, ie. random:1.
I use a job description like this:
$ cat bug.fio
[job1]
rw=read
nrfiles=10 ; use 10 files
openfiles=1 ; but only keep one open
size=10M ; so each file is 1M
bs=256K ; do 4 reads per file
iodepth=1
file_service_type=roundrobin:1
filename_format=__fio/junk.$filenum
directory=.
I would expect fio to do something like
[...]
./__fio/junk.job1.0 open
./__fio/junk.job1.0 read 0 262144
./__fio/junk.job1.0 close
./__fio/junk.job1.1 open
./__fio/junk.job1.1 read 0 262144
./__fio/junk.job1.1 close
./__fio/junk.job1.2 open
[...]
but I see (io.log):
[...]
./__fio/junk.job1.0 open
./__fio/junk.job1.0 read 0 262144
./__fio/junk.job1.0 read 262144 262144
./__fio/junk.job1.0 read 524288 262144
./__fio/junk.job1.0 read 786432 262144
./__fio/junk.job1.0 close
./__fio/junk.job1.1 open
./__fio/junk.job1.1 read 0 262144
./__fio/junk.job1.1 read 262144 262144
./__fio/junk.job1.1 read 524288 262144
./__fio/junk.job1.1 read 786432 262144
./__fio/junk.job1.1 close
./__fio/junk.job1.2 open
[...]
In the debug log (all.log) are a lot of error messages like below. It looks like fio cycles through all files, but fails for all non-open files job1.1 to job1.9 before reaching the open job1.0 again.
Description of the bug:
A combination of
nrfiles
,openfiles
andfile_service_type
does not work as expected (at least from my perspective). I looks like fio considers only open files when choosing the next file to process. This may also be related to #1676, #1677. Fio has similar (unexpected) behavior with other file_service_type modes, ie.random:1
.I use a job description like this:
I would expect fio to do something like
but I see (
io.log
):In the debug log (
all.log
) are a lot of error messages like below. It looks like fio cycles through all files, but fails for all non-open filesjob1.1
tojob1.9
before reaching the openjob1.0
again.Environment:
fio version:
fio-3.28
Reproduction steps
fio bug.fio --write_iolog=io.log --debug=all > all.log
or