Sample Header Ad - 728x90

Understanding "Laying out IO file" in fio

0 votes
0 answers
1367 views
I am trying to understand what really happens when in the "Laying out IO file". I have btrfs installed on a raw block device and whenever I run fio with the following configuration, I see the laying out step takes about 40 minutes to complete before the actual fio job starts to perform IO
runtime=600
rw=readwrite
rwmixwrite=90
random_distribution=random
percentage_random=100
size=50%
iodepth=16
ioengine=libaio
direct=1
bs=4096
time_based=1
fallocate=none
directory=/tmp/fs_d765f32a-1a34-11eb-8644-61649a50b743
write_lat_log=/tmp/ll
log_avg_msec=500
log_unix_epoch=1
log_max_value=1
filesize=8GB
If you see the following lines, the command is started at 15:19:51 and Laying out file finishes at 15:58:31 (about 40 minutes laying out the file). I tried looking through the source code and it seems like laying out occurs whenever the program decides to extend a file. I am assuming laying out then happens only if there are reads in the fio configuration but its a bit unclear to me at this point as to why it should take 40 minutes. Appreciate some insight into what really goes on here.
2020-10-29 15:19:51,583 [MainThread] - root - DEBUG - Fio job output: job-0: (g=0): rw=rw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=16
fio-3.16
Starting 1 process
job-0: Laying out IO file (1 file / 4096MiB)

2020-10-29 15:58:31,896 [MainThread] - root - DEBUG - Fio job output:
job-0: (groupid=0, jobs=1): err= 0: pid=70: Thu Oct 29 22:58:31 2020
....
....
Asked by linux_engine (1 rep)
Oct 30, 2020, 07:07 AM