Skip to contentSkip to conversation

io_size usage

DISCUSSION Jun He 2 participants 3 messages Dec 9, 2015 – Dec 10, 2015

lore
Share & tools
lore

Jun He

author
#0 lore raw

Hi all,
I think there is a bug for io_size.

For example, I want to write 16KB data to a file of size 8KB (so each block is written twice) and I have the following job file:

[global]
ioengine=sync
rw=write
bs=4kb
size=8kb
io_size=32kb

[job1]
write_iolog=iolog.1

After running, iolog.1 will contain the following contents:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

This shows that each block has been only written once.

If I change the ioengine to libaio, iolog.1 will contain:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

Bug or wrong usage?

Thanks,
Jun

#1 lore raw

Hi,

Your job sets and io_size four times that of "size" of the disk that you are using. This will force your I/O to wrap abound to the start of the region (why not use loops?). Are you saying that you think the sync job's iolog is wrong because it only says it performed one loop?

Quoted 61 lines · Jun He

Hi all,
I think there is a bug for io_size.

For example, I want to write 16KB data to a file of size 8KB (so each block is written twice) and I have the following job file:

[global]
ioengine=sync
rw=write
bs=4kb
size=8kb
io_size=32kb

[job1]
write_iolog=iolog.1

After running, iolog.1 will contain the following contents:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

This shows that each block has been only written once.

If I change the ioengine to libaio, iolog.1 will contain:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

Bug or wrong usage?

Thanks,
Jun

--
To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Sitsofe | http://sucs.org/~sits/
author
#2 lore raw

Thanks for the mentioning the 'loops' option.

But still, it is weird that by changing ioengine, iolog will report differently. I think either sync mistakenly performs only one loop, or the IO is done correctly but iolog report is wrong.

I think the expected behavior is that iolog is the same for both sync and libaio. And both of them should follow the HOW:

"if 'size' is set to 21G, and 'io_size' is set to 40G, then fio will do 40G of IO within the 0..20G region."

Jun

Quoted 74 lines · Sitsofe Wheeler

Hi,

Your job sets and io_size four times that of "size" of the disk that you are using. This will force your I/O to wrap abound to the start of the region (why not use loops?). Are you saying that you think the sync job's iolog is wrong because it only says it performed one loop?

Quoted 57 lines · Jun He

Hi all,
I think there is a bug for io_size.

For example, I want to write 16KB data to a file of size 8KB (so each block is written twice) and I have the following job file:

[global]
ioengine=sync
rw=write
bs=4kb
size=8kb
io_size=32kb

[job1]
write_iolog=iolog.1

After running, iolog.1 will contain the following contents:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

This shows that each block has been only written once.

If I change the ioengine to libaio, iolog.1 will contain:

fio version 2 iolog
job1.0.0 add
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close
job1.0.0 open
job1.0.0 write 0 4096
job1.0.0 write 4096 4096
job1.0.0 close

Bug or wrong usage?

Thanks,
Jun

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Sitsofe | http://sucs.org/~sits/