Linux performs readaheads (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.
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...
Could above subtle out-of-sequence reads 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 usual for 10-20-30-40-50 read)