Article 5JFMC Linux readAhead when concurrent reads done on same file

Linux readAhead when concurrent reads done on same file

by
aKumara
from LinuxQuestions.org on (#5JFMC)
Linux perform read ahead (specified in /sys/block//queue/read_ahead_kb) when a file is read sequentially.

Interested OS : Red hat Linux
Interested File System : xfs, ext4

What is the criteria for deciding a sequential read is done ? Consider multiple concurrent reads done on same file using pread (https://man7.org/linux/man-pages/man2/pwrite.2.html) with same or different FDs.

e.g.

Same FD. reads at positions 10-20-30-78-89(out of seq reads) -40-50-60-70 - 23-34 (out of seq reads)- 80-90-100...

Can above subtle out of sequence reads could avoid readaheads in this case ?

If so, Would using two different FDs solve this issue (i.e. a separate FD used for reads at 78-89-23-34) ? (i.e. readAheads will happen as uasual for 10-20-30-40-50 read)latest?d=yIl2AUoC8zA latest?i=EZuhPDMLF_g:ViN5nDwYa2A:F7zBnMy latest?i=EZuhPDMLF_g:ViN5nDwYa2A:V_sGLiP latest?d=qj6IDK7rITs latest?i=EZuhPDMLF_g:ViN5nDwYa2A:gIN9vFwEZuhPDMLF_g
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments