Date: Mon, 13 Jan 2020 14:42:26 +0100 (CET) From: Wojciech Puchar <wojtek@puchar.net> To: Conrad Meyer <cem@freebsd.org> Cc: Wojciech Puchar <wojtek@puchar.net>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: adding some smartness in file cache Message-ID: <alpine.BSF.2.20.2001131441190.2189@puchar.net> In-Reply-To: <CAG6CVpVDfPz78t%2B=2e1S4C045oEjhRobZbOJ3xhwNdkK7ZQoTA@mail.gmail.com> References: <alpine.BSF.2.20.2001121317290.60545@puchar.net> <CAG6CVpVDfPz78t%2B=2e1S4C045oEjhRobZbOJ3xhwNdkK7ZQoTA@mail.gmail.com>
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. or simply use DIRECTIO. But it is not about my own program to be written but general use - like copying large file, downloads/uploads over FTP or SMB or NFS. i am talking about doing it automatically when having large linear reads > > 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" > _______________________________________________ > 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?alpine.BSF.2.20.2001131441190.2189>