adding some smartness in file cache
Conrad Meyer
cem at freebsd.org
Mon Jan 13 09:13:44 UTC 2020
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 at 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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
More information about the freebsd-hackers
mailing list