Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Apr 2014 13:34:38 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Dmitry Sivachenko <trtrmitya@gmail.com>
Cc:        freebsd-hackers@FreeBSD.org, Trond =?ISO-8859-1?Q?Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Subject:   Re: madvise() vs posix_fadvise()
Message-ID:  <1396553678.81853.288.camel@revolution.hippie.lan>
In-Reply-To: <2CB392D0-5198-41EB-8191-8B02FE432334@gmail.com>
References:  <D6BD48AF-9522-495D-8D54-37854E53C272@gmail.com> <201404031102.38598.jhb@freebsd.org> <1396539837.81853.278.camel@revolution.hippie.lan> <201404031230.40380.jhb@freebsd.org> <2CB392D0-5198-41EB-8191-8B02FE432334@gmail.com>

index | next in thread | previous in thread | raw e-mail

On Thu, 2014-04-03 at 23:10 +0400, Dmitry Sivachenko wrote:
> On 03 Сав. 2014 Ч., at 20:30, John Baldwin <jhb@FreeBSD.org> wrote:
> 
> > 
> > The latter.  It's sort of like a lazy O_DIRECT.  Each time you call write(2),
> > it tries to move any clean pages from your current sequentially written
> > stream from inactive to cache, so the pages won't move until a subsequent
> > write(2) after bufdaemon or the syncer actually forces them to be written.
> > Unfortunately, it is currently implemented by doing an internal
> > FADV_DONTNEED after each read() or write().  It would be better if it was
> > implemented as a callback when buffers are completed.
> 
> 
> 
> Sounds like FADV_NOREUSE should be befeficial for any log-writing program? (syslogd, apache, nginx, .....)

I'll probably do something with syslogd soon-ish, it'll help our
embedded products at $work that are tight on memory already.

-- Ian




help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1396553678.81853.288.camel>