* Re: question about fio write offset
[not found] <tencent_E24C0F8C628C11E92A4A21798A161CE7E207@qq.com>
@ 2018-03-13 17:51 ` Jens Axboe
2018-03-14 3:13 ` wk
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2018-03-13 17:51 UTC (permalink / raw)
To: wk, fio
On 3/12/18 7:59 PM, wk wrote:
> Hi, axboe:
>
> � �Sorry for write email to you directly.
>
> � � I have a question about fio. I want generate a �write sequence:
> � � first write: � � 0-8KB
> � � second write: 4-12KB
> � � third write : � �8-16KB
> � � forth wirte: � � 12-20KB
> � � fifth write: � � � 16KB-24KB
>
> � � Each io is 8KB, and next io offset is 4KB. How to write the fio command?
> � � I test "fio --ioengine=libaio --direct=1 --rw=randwrite --number_ios=4 �--norandommap --randrepeat=0 --iodepth=1 --size=100% --numjobs=1 --bs=8k �--filename=/dev/nvme0n1 --loops=1 �--blockalign=4096 --debug=io --name=DI_Stress", but it seems each io offset is multiple of 4KB.But it is �not overlap last 8KB �writed block.
>
> � � �I also test "fio --ioengine=libaio --direct=1 --rw=write --number_ios=4 �--norandommap --randrepeat=0 --iodepth=1 --size=100% --numjobs=1 --bs=8k �--filename=/dev/nvme0n1 --loops=1 �--blockalign=4096 --debug=io --name=DI_Stress", but it seems each io offset is multiple of 4KB.But it is �not overlap IO. Some fio log is below:
> � � io complete: io_u 0x1f21600: off=0/len=8192/ddir=1io
> � � io complete: io_u 0x1f21600: off=8192/len=8192/ddir=1io
> � � io complete: io_u 0x1f21600: off=16384/len=8192/ddir=1io
> � � io complete: io_u 0x1f21600: off=24576/len=8192/ddir=1io
> I want change the red offset address '0/8192/16384/24576' to '0/4096/8192/12288' by change my FIO command.
Don't email me directly, I've CC'ed the proper list.
You're supposed to be able to do that with:
bs=8k
rw=write:-4k
which will write 0..8k, 4..12k, etc. But there's a bug there, so you need to
update to latest -git first, it needs this commit:
commit 69b98f11d62cb12482130fac79b8ebf00c0bb139
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue Mar 13 11:49:55 2018 -0600
io_u: only rewind file position if it's non-zero
and it should work for you.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: question about fio write offset
2018-03-13 17:51 ` question about fio write offset Jens Axboe
@ 2018-03-14 3:13 ` wk
0 siblings, 0 replies; 2+ messages in thread
From: wk @ 2018-03-14 3:13 UTC (permalink / raw)
To: Jens Axboe, fio
[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]
Thank you very much. It works very well.
------------------ Original ------------------
From: "Jens Axboe"<axboe@kernel.dk>;
Date: Wed, Mar 14, 2018 01:51 AM
To: "wk"<304702903@qq.com>;"fio@vger.kernel.org"<fio@vger.kernel.org>;
Subject: Re: question about fio write offset
On 3/12/18 7:59 PM, wk wrote:
> Hi, axboe:
>
> Sorry for write email to you directly.
>
> I have a question about fio. I want generate a write sequence:
> first write: 0-8KB
> second write: 4-12KB
> third write : 8-16KB
> forth wirte: 12-20KB
> fifth write: 16KB-24KB
>
> Each io is 8KB, and next io offset is 4KB. How to write the fio command?
> I test "fio --ioengine=libaio --direct=1 --rw=randwrite --number_ios=4 --norandommap --randrepeat=0 --iodepth=1 --size=100% --numjobs=1 --bs=8k --filename=/dev/nvme0n1 --loops=1 --blockalign=4096 --debug=io --name=DI_Stress", but it seems each io offset is multiple of 4KB.But it is not overlap last 8KB writed block.
>
> I also test "fio --ioengine=libaio --direct=1 --rw=write --number_ios=4 --norandommap --randrepeat=0 --iodepth=1 --size=100% --numjobs=1 --bs=8k --filename=/dev/nvme0n1 --loops=1 --blockalign=4096 --debug=io --name=DI_Stress", but it seems each io offset is multiple of 4KB.But it is not overlap IO. Some fio log is below:
> io complete: io_u 0x1f21600: off=0/len=8192/ddir=1io
> io complete: io_u 0x1f21600: off=8192/len=8192/ddir=1io
> io complete: io_u 0x1f21600: off=16384/len=8192/ddir=1io
> io complete: io_u 0x1f21600: off=24576/len=8192/ddir=1io
> I want change the red offset address '0/8192/16384/24576' to '0/4096/8192/12288' by change my FIO command.
Don't email me directly, I've CC'ed the proper list.
You're supposed to be able to do that with:
bs=8k
rw=write:-4k
which will write 0..8k, 4..12k, etc. But there's a bug there, so you need to
update to latest -git first, it needs this commit:
commit 69b98f11d62cb12482130fac79b8ebf00c0bb139
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue Mar 13 11:49:55 2018 -0600
io_u: only rewind file position if it's non-zero
and it should work for you.
--
Jens Axboe
[-- Attachment #2: Type: text/html, Size: 3040 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-14 3:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_E24C0F8C628C11E92A4A21798A161CE7E207@qq.com>
2018-03-13 17:51 ` question about fio write offset Jens Axboe
2018-03-14 3:13 ` wk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.