From owner-freebsd-current@FreeBSD.ORG Sun May 11 06:41:24 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32B361065685; Sun, 11 May 2008 06:41:24 +0000 (UTC) (envelope-from bp@eden.barryp.org) Received: from itasca.hexavalent.net (itasca.hexavalent.net [67.207.138.180]) by mx1.freebsd.org (Postfix) with ESMTP id 0FBEF8FC1F; Sun, 11 May 2008 06:41:24 +0000 (UTC) (envelope-from bp@eden.barryp.org) Received: from host-42-60-230-24.midco.net ([24.230.60.42] helo=eden.barryp.org) by itasca.hexavalent.net with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.67) (envelope-from ) id 1Jv4b4-0003x9-Hw; Sun, 11 May 2008 00:59:46 -0500 Received: from macbook.home ([10.66.1.10]) by eden.barryp.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67 (FreeBSD)) (envelope-from ) id 1Jv4ay-000IKc-8C; Sun, 11 May 2008 00:59:40 -0500 Message-ID: <48268B4B.2040606@barryp.org> Date: Sun, 11 May 2008 00:59:39 -0500 From: Barry Pederson User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Kris Kennaway References: <18447.17658.759349.720175@grasshopper.cs.duke.edu> <480F4972.20609@FreeBSD.org> In-Reply-To: <480F4972.20609@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Re: ZFS file caching question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2008 06:41:24 -0000 Kris Kennaway wrote: > Andrew Gallatin wrote: >> If I have, say, 512MB RAM and a 1GB file which is written or read >> sequentially on an otherwise idle system, I'd expect the last 512MB (- >> epsilon) of the file's pages to be cached in RAM. This is true for >> UFS, but it does not appear to be the case with ZFS (see example >> below). >> >> Can somebody explain how the arc cache in ZFS relates to the normal >> page cache used by traditional filesystems? Are ZFS filesystems >> cached exclusively in the arc cache, and not in the page cache? Is >> the arc cache per-filesystem, per-pool, or global for ZFS as a whole? > > The ZFS arc cache is completely independent from the normal buffer cache > 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. > >> Hmm.. Could this be the cause of the problems with ZFS and mmap'ed files? > > What problems do you mean? There were coherency problems but I think > they were fixed. > > Kris I noticed in the release notes for 8.0-CURRENT under "What's New": http://www.freebsd.org/relnotes/CURRENT/relnotes/new.html it says: "A problem with using mmap(2) on ZFS filesystems has been fixed." Can anyone say which commits fixed this, and if they have been or will be MFCed to 7-STABLE? I'm curious because I've been having lots of trouble with Cyrus IMAP on 7.0-RELEASE corrupting cyrus.cache files, and was somewhat suspicious it could be mmap related. Barry