Re: FIO mmap options dictate a minimum block size of 4096 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 20 April 2017 at 23:12, Sitsofe Wheeler <sitsofe@xxxxxxxxx> wrote:
>
> On 20 April 2017 at 15:03, kjaszczerski <kjaszczerski@xxxxxxxxx> wrote:
>>
>> I'm trying to run FIO on mmap engine on 4k socket and 4k channel. I'd like
>> to use wrokload with blocksize parameter value less than 4k, is it possible
>> ?
>
> You didn't give an example jobfile, fio version, operating system
> (which are really necessary to answer these types of questions) so the
> following is going to be a lot of speculation.
>
> I don't know if you also filed https://github.com/axboe/fio/issues/339
> but there's a partial answer there (using direct=1 forces alignment
> and size constraints). There's a follow up point which is the message
> stems from a desire to catch msync related errors earlier:
> https://github.com/axboe/fio/commit/913ea0db12596b735a030a1836bd913497b7120a
> . I suppose a filesystem will never have a blocksize smaller than a
> page and alignment constraints mean an msync must always start page
> aligned (http://man7.org/linux/man-pages/man2/msync.2.html ) so if you
> have any type of fsync taking place that will trigger that check.

The above is slightly incorrect because the requirement for page
alignment on the address passed to msync() must be obeyed regardless
of your filesystem/device. Since the fio mmap ioengine approximates
direct I/O by using msync() (see
https://github.com/axboe/fio/blob/fio-2.19/engines/mmap.c#L189 ) even
a job using that ioengine which only asks for direct=1 will have to
obey the "all offsets must be page aligned" requirement. In order to
satisfy that requirement, when using direct=1 with the mmap ioengine
the blocksize must always be a (non-zero) multiple of the page size
and if your page size is 4096 this means you can't use a block size
less than that.

-- 
Sitsofe | http://sucs.org/~sits/
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux