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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2014-04-03 at 23:10 +0400, Dmitry Sivachenko wrote: > On 03 =C1=D0=D2. 2014 =C7., at 20:30, John Baldwin <jhb@FreeBSD.org> wr= ote: >=20 > >=20 > > The latter. It's sort of like a lazy O_DIRECT. Each time you call w= rite(2), > > it tries to move any clean pages from your current sequentially writt= en > > stream from inactive to cache, so the pages won't move until a subseq= uent > > write(2) after bufdaemon or the syncer actually forces them to be wri= tten. > > 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. >=20 >=20 >=20 > Sounds like FADV_NOREUSE should be befeficial for any log-writing progr= am? (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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1396553678.81853.288.camel>