Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 May 2008 18:15:40 +0200
From:      Peter Schuller <peter.schuller@infidyne.com>
To:        freebsd-current@freebsd.org
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>
Subject:   Re: ZFS file caching question
Message-ID:  <200805011815.50808.peter.schuller@infidyne.com>
In-Reply-To: <480F4972.20609@FreeBSD.org>
References:  <18447.17658.759349.720175@grasshopper.cs.duke.edu> <480F4972.20609@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
> on FreeBSD.  This is inefficient in a number of ways.  I have also seen
> things that make me suspicious that it is not caching properly even when
> you tune it to be "large enough" (if possible given memory constraints),
> but I haven't confirmed this.

FWIW, I have had some suspiciouns here too strictly from a user-centric point 
of view.

Most recently I found that I could not get ZFS to cache enough such 
that "pkg_info" would not have to get down on disk (thus making all package 
installation and similar dead-slow, due to the number of times /var/db/pkg is 
accesses in deep dependency hierarchies).

In this case I tended up killing as much as I could  on the machine (web 
browsers, MUA:s, whatever else), on the theory that large files being kept 
open would affect the caching strategy. Even after killing most stuff and 
after multiple pkg_info:s (to accumulate frequency), it was still only 
caching enough for perhaps 20% of what pkg_info needs on this machine (when 
invoked without arguments, listing all packages).

I don't know if this is just a result of giving too much weight to past 
history or if there is an actual bug somewhere; but the perceived end-result 
for me as a user was clearly significantly worse than a plain page-wise LRU 
would have given.

I ended up rebooting the machine to get package upgrades to complete within a 
reasonable amount of time.

This was on my 64 bit desktop machine with:

vm.kmem_size_max="1258291200"
vfs.zfs.prefetch_disable="1"
vfs.zfs.arc_max="838860800"

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)

iEYEABECAAYFAkgZ7LYACgkQDNor2+l1i33wKACfYBSTAJlFDnUe9aBilLEcAuf/
GmIAmwWAGKjltx/h5eihARvJNmLAgXti
=h0/j
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805011815.50808.peter.schuller>