Re: fadvise_hint behavior unclear from documentation

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

 



On 9/18/21 4:46 PM, Isawan Millican wrote:
> Hi,
> 
> I was using fio and noticed that the throughput was lower than expected for
> random reads to a small file; I would expect it to be entirely cached in
> memory. The issue seems to be because fadvise_hint=0 is not behaving as
> documented as POSIX_FADV_DONTNEED is being called.
> This might be the intended bahavior as the program is flushing the pages
> to purely test IO throughput
> 
> If the current behaviour is intentional, is there an existing flag that 
> could
> provide the desired functionality? Essentially I'd like to test the IO
> throughput of various file sizes without bypassing the page cache to see the
> effects of caching.

Just set invalidate=0 and fio won't invalidate the address space page
cache for the files or devices used.

You seem to have snipped most of the cmdhelp for fadvise_hint:

        fadvise_hint: Use fadvise() to advise the kernel on IO pattern
                type: string (opt=bla)
             default: 1
        valid values: 0          Don't issue fadvise/madvise
                    : 1          Advise using fio IO pattern
                    : random     Advise using FADV_RANDOM
                    : sequential Advise using FADV_SEQUENTIAL

which tells you that it's about telling the kernel if you're doing
random or sequential IO (this will impact read-ahead, for example).
Invalidation is kept separate.

-- 
Jens Axboe




[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