Date: Sat, 5 Apr 2014 01:02:08 +0400 From: Dmitry Sivachenko <trtrmitya@gmail.com> To: John Baldwin <jhb@FreeBSD.org> Cc: freebsd-hackers@freebsd.org, =?utf-8?Q?Trond_Endrest=C3=B8l?= <Trond.Endrestol@fagskolen.gjovik.no> Subject: Re: madvise() vs posix_fadvise() Message-ID: <5426E303-E35B-4D4A-AB62-3571228A5A2C@gmail.com> In-Reply-To: <201404041612.35889.jhb@freebsd.org> References: <D6BD48AF-9522-495D-8D54-37854E53C272@gmail.com> <201404031102.38598.jhb@freebsd.org> <EF134BCA-1E92-4C98-8763-9A31EA96839A@gmail.com> <201404041612.35889.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05 =D0=B0=D0=BF=D1=80. 2014 =D0=B3., at 0:12, John Baldwin = <jhb@FreeBSD.org> wrote: >=20 > MADV_WILLNEED is not going to give you what you want. OTOH, if you = haven't > tried FreeBSD 10 yet, I would suggest trying that. There have been = changes > to pagedaemon that might make it do a better job of kicking out the = pages > of the log files automatically. >=20 I did. My situation became worse after I moved from stable/9 to = stable/10. My feeling is that stable/10 pushes rarely used mmaped pages out of RAM = more aggressively than stable/9 did. For now, the only solution I found is doing msync(MS_INVALIDATE) on log = files after gzipping and after backup via rsync. This moves corresponding memory pages from Inactive to Free and prevents = system to occupy all free memory with cached log files and to purge = mmaped data out of RAM to accomodate more disk cache. What I would love to see is an ability to tell OS not to release mmaped = data unless "really needed" (disk cache is not an excuse).=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5426E303-E35B-4D4A-AB62-3571228A5A2C>