[erlang-questions] Information on file:advise/4

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Sun Aug 26 14:44:30 CEST 2018

On Sun, Aug 26, 2018 at 9:23 AM Valentin Micic <v@REDACTED> wrote:

> Hi,
> Would it be possible for someone to shed a bit more light on various
> posix_file_advise() options in file:advise/4 function?
It binds to the posix_fadvise(2) call If I remember correctly. Thus, the
actual behavior is dependent on your operating system. FreeBSD ignores
SEQUENTIAL for instance, because its default semantics autodetects
sequential access. FreeBSD can also handle a WILL_NEED by async loading
that data. NetBSD ignores the offset and len in some cases and applies it
to the whole file. OpenBSD doesn't support the call at all it seems.
Illumos supports the call, but does so in libc, detects that the parameters
are valid, and then does nothing with the information. This is compliant
with the specification.

In most cases, you want to carefully measure before toying with these
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180826/7f52a1a5/attachment.htm>

More information about the erlang-questions mailing list