On Sat, 1 Nov 2025, at 11:31, Pádraig Brady wrote: >> Interesting. Do you happen to have any performance benchmarks from when >> fadvise was added to 'cp'? I assumed that the impact of it would be >> minimal, but that report proves otherwise at least for ZFS. > > We saw a 5% speedup when reading from SSD: > https://github.com/coreutils/coreutils/commit/15f1d0c9a > I measured a more significant speedup with spinning disks.
Reading from SSD (or spinning disk, or hardware RAID controller) will do better with well-tuned readahead, vs waiting for the read(2) call from userspace. The queue depth of SSDs is especially beneficial when we can obtain simultaneous outstanding read opcodes. Perhaps POSIX_FADV_SEQUENTIAL causes readahead to kick in sooner? I'd hope the kernel heuristics aren't too complex for sequential read, but haven't poked around in Linux. Cheers, Phil
