I am working on an application which does sequentially write a large file (and does not read at all), and I would like to use
Under Linux,sets the readahead window to the default size for the backing device;
POSIX_FADV_NORMALdoubles this size, and
POSIX_FADV_SEQUENTIALdisables file readahead entirely.
It all depends on the temporal locality of your data. If your application won't need the data soon after it was written, then you can go with
POSIX_FADV_NOREUSE to avoid writing to the buffer cache (in a similar way as the
O_DIRECT flag from