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)
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)