From owner-freebsd-fs@freebsd.org Tue Aug 30 13:37:11 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C5FBC7626 for ; Tue, 30 Aug 2016 13:37:11 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41DE2F72 for ; Tue, 30 Aug 2016 13:37:11 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bejDw-0007CN-T8; Tue, 30 Aug 2016 14:37:09 +0100 Date: Tue, 30 Aug 2016 14:37:08 +0100 From: Gary Palmer To: Ben RUBSON Cc: FreeBSD FS Subject: Re: [ZFS] ARC accounting bug ? Message-ID: <20160830133708.GD56297@in-addr.com> References: <71DED907-10BE-44C2-982B-12974152895D@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71DED907-10BE-44C2-982B-12974152895D@gmail.com> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2016 13:37:11 -0000 On Sat, Aug 27, 2016 at 06:15:18PM +0200, Ben RUBSON wrote: > Playing with these commands : > # dtrace -n 'sdt:zfs::arc-hit {@[execname, stack()] = count();}' > # dtrace -n 'sdt:zfs::arc-miss {@[execname, stack()] = count();}' > > We can see that these are readdir calls which produce arc-misses, and that readdir calls also produce arc-hits. > > It would be interesting to know why some lead to hits, and some lead to misses. > > (note that ls -lR / rsync commands produces exactly the same dtrace results/numbers as find command) If the *same* readdir() call produces both a hit and a miss, my guess would be that it is hitting two data sources for the data. I am not familiar with ZFS, however UFS treats a directory as a special type of file. Filename information and the inode associated with that filename would be in the directory "file. The inodes would be in the inode table. If ZFS is similar, then the directory "file" reads would be misses and the inode table reads would be hits Regards, Gary