adding some smartness in file cache

Wojciech Puchar wojtek at puchar.net
Mon Jan 13 13:42:32 UTC 2020


> 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 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"
> _______________________________________________
> 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