-
Hi. I have a question about fio readonly test and file page cache. Below are four benchmark commands that I use. > fio --filename=/data/somefile --name=read --ioengine=io_uring --iodepth=8 --readonly --rw=read --bs=4M --direct=1 --buffered=0 --numjobs=1 --invalidate=1 --nonvectored=1 --registerfiles=1 Even with the use of
How can I keep fio from touching the file page cache? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Even if fio laid out the files with O_DIRECT, if the fs is instantiating new blocks, it'll resort to buffered IO regardless. Once the file has been laid out, fio will invalidate the page cache contents of it before starting the job, however, by default. |
Beta Was this translation helpful? Give feedback.
-
Forgot to mention, there are always filesystems (like btrfs) that are broken in how they deal with O_DIRECT async reads and just do buffered IO for that if it's larger than a page... This could be another explanation for why there's page cache contents for the inode afterwards. In any case, this isn't really something fio can control or manage - it just does O_DIRECT and if the kernel decides to do buffered IO for whatever reason, then fio doesn't even know about it. |
Beta Was this translation helpful? Give feedback.
-
from
|
Beta Was this translation helpful? Give feedback.
Forgot to mention, there are always filesystems (like btrfs) that are broken in how they deal with O_DIRECT async reads and just do buffered IO for that if it's larger than a page... This could be another explanation for why there's page cache contents for the inode afterwards. In any case, this isn't really something fio can control or manage - it just does O_DIRECT and if the kernel decides to do buffered IO for whatever reason, then fio doesn't even know about it.