Date: Tue, 18 Nov 1997 23:11:56 -0500 (EST) From: "Matthew N. Dodd" <winter@jurai.net> To: Arjan de Vet <Arjan.deVet@adv.IAEhv.nl> Cc: hackers@FreeBSD.ORG Subject: Re: caching only directory disk blocks Message-ID: <Pine.BSF.3.95q.971118230101.8472b-100000@sasami.jurai.net> In-Reply-To: <199711182225.XAA14266@adv.IAEhv.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 18 Nov 1997, Arjan de Vet wrote: > Would it be possible to create a mount option (or something else) which > would only cache disk blocks from directories and not disk blocks from > 'normal' files? Or give the former precedence over the latter for staying > in the buffer cache? Have you looked at the output of `vmstat -s` and looked at the name lookup statistics? I believe there is a sysctl that allows you to tune how much memory you allow the name cache to use, but I can't remember what it is right now. > The reason why I'm asking this? I'm currently playing with the Squid > proxy-cache to improve its usage of the file system cache. For > applications like Squid it's very important to keep as much directory > blocks in the buffer cache as possible. Caching of 'normal' files doesn't > make any sense because Squid has its own hot-object cache and most file > access is too random anyway in order for the buffer cache to be useful. I'm not sure how squid works, but in my world it would save the files in wire format, open, mmap, close (to cut down on FDs used) and just write the whole thing when someone asks for it. The cache would optimally keep track of the highest hit pages and use madvise to insure that they are or aren't cached. I would check the source to see if squid doesn't already do something like this. Have a good one. /* Matthew N. Dodd | A memory retaining a love you had for life winter@jurai.net | As cruel as it seems nothing ever seems to http://www.jurai.net/~winter | go right - FLA M 3.1:53 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.971118230101.8472b-100000>