-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Hi team, I’m currently using fio version 3.40 for performance testing, and I’ve encountered some unexpected behavior when using the size and offset_increment parameters together. I couldn’t find an explanation in the documentation, so I’d appreciate some help.
Here’s the command I’m using:
fio --name=seq-write \
--ioengine=libpmem \
--direct=1 \
--sync=1 \
--bs=4096 \
--filesize=2G \
--size=$((2/2))G \
--numjobs=2 \
--offset_increment=1G \
--cpus_allowed_policy=split \
--thread \
--rw=write \
--filename=/mnt/pmem0/fiofile \
--cpus_allowed=0-27
My goal is to have the two threads each write to half of a 2GB file: one to the first 1GB, and the other to the second 1GB. Based on the documentation, offset_increment seems like the correct parameter for this.
However, when I first ran the command, I got this output:
Run status group 0 (all jobs):
WRITE: bw=2107MiB/s (2209MB/s), 2107MiB/s-2107MiB/s (2209MB/s-2209MB/s), io=1024MiB (1074MB), run=486-486msec
It shows only 1GB of total I/O, and strangely, only one job seems to have been executed—even though I didn’t include group_reporting, so I expected output for both jobs.
When I ran the exact same command again, I got the expected result:
Run status group 0 (all jobs):
WRITE: bw=4719MiB/s (4948MB/s), 2359MiB/s-2359MiB/s (2474MB/s-2474MB/s), io=2048MiB (2147MB), run=434-434msec
This time, I saw output for both jobs and a total I/O of 2GB.
I also noticed that if I manually create the file beforehand, I consistently get correct 2GB I/O results. So it seems the issue only occurs when fio creates the file for the first time.
This behavior seems incorrect to me. Why is only one thread/job running the first time the file is created, resulting in just 1GB of I/O? Is there a configuration I missed? I couldn’t find anything in the documentation to explain this.
I also tried running with the --debug=fio,file option, but the output was extremely verbose and I wasn’t able to extract any useful information from it.
Thanks in advance for your help!