Date: Mon, 13 Jan 2020 01:13:31 -0800 From: Conrad Meyer <cem@freebsd.org> To: Wojciech Puchar <wojtek@puchar.net> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: adding some smartness in file cache Message-ID: <CAG6CVpVDfPz78t%2B=2e1S4C045oEjhRobZbOJ3xhwNdkK7ZQoTA@mail.gmail.com> In-Reply-To: <alpine.BSF.2.20.2001121317290.60545@puchar.net> References: <alpine.BSF.2.20.2001121317290.60545@puchar.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Consider modifying your linear scan programs to use posix_fadvise(2) POSIX_FADV_DONTNEED and/or POSIX_FADV_NOREUSE. You're right that we could be a bit more clever than straight LRU for eviction (if we are not already), such as incorporating some hybrid scoring using MRU/LFU/RR-like eviction policies. Your proposal is an extremely specific MRU heuristic. On Sun, Jan 12, 2020 at 4:21 AM Wojciech Puchar <wojtek@puchar.net> wrote: > > FreeBSD uses unified cache which is generally great but have some > disadventages. > > One common is case of linear reading or writing of large files. > This wipes out other things from memory very quickly. > > Can cache be made to drop every full block (MAXPHYS) from cache instantly > after is fully read by user program or is wrote to disk. > > This way memory would be much better utilized in caching small I/O. > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVDfPz78t%2B=2e1S4C045oEjhRobZbOJ3xhwNdkK7ZQoTA>