From owner-freebsd-fs@freebsd.org Tue Aug 30 18:11:16 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 388E3BC9F8A for ; Tue, 30 Aug 2016 18:11:16 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF223386 for ; Tue, 30 Aug 2016 18:11:15 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id i5so4248095wmg.2 for ; Tue, 30 Aug 2016 11:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=747im0ieYr+BvUDRtf247axFCqL69k8DXXAv8DffLbM=; b=0oWFCwVhAH02ZBpDtt4+19LpZB/96gcOCXZ/qSOIYWX1vUvk8HkPT7nKHz9CKdFE6j 7FWWnfz9FSduwhKozvR27Lf8iscFPDSWsnFR0fMp1xC4WvNqFRkHk2oYaV28wBhZ7zJB I5trh/Npgwob3bkZvlNkYLiFWfN0lsJPz4qvnFN852B7a+ic5qLOlqh0b2zhWdIVBtG9 UGWAzjTwHOTtNzxF1SMouuO1xzygumvRADVa51jKdvVrfHnqb3SFKo1JkrCn++Fn7kKI VBCHKfqUAZmuTbCxgDlg7eMrEEFWegCulAu/Ez46BxtRiq0ug6P0mKs7uj4KROnPMDnB HPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=747im0ieYr+BvUDRtf247axFCqL69k8DXXAv8DffLbM=; b=B/WOayRb7LRSNaiJ5gN/oO0DZTlPBRkcNrW2ncp62dbMKqEEHuzBHOtFj6LeKc4z6k tO7BkGjEyy4+JHm43uhlUI8+HXrhkZys0q2OWbBnpOVMTzjfRC6QyHhRLpC6UVnsV1Us 538RZHNEnNfWScPwfJxfyuLGlviZ/jOnqT83vDUwwAEST0YdNJqEeygICwvNMYYHOLEv nuf+82FQHvrWCGlc3IyTOvOa+ipGD6+pAihYcHLDcQCdjmU9Sp2m7Z7xVV0WYmAbwGXq /GbRTrd/eIYxzTEmDfxotlOOpi1VYxJ7NnM5HTNv0lga4xm6qOnOrwPyvOry38M3RWmr Fmew== X-Gm-Message-State: AE9vXwMjp2YXdY1bQvsWZEp5/ysjxyf0O95b6eiAY6mMCxFGqHONkAnAWauS4WBHiC2vdQ== X-Received: by 10.194.142.78 with SMTP id ru14mr4523289wjb.41.1472580673866; Tue, 30 Aug 2016 11:11:13 -0700 (PDT) Received: from macbook-air-de-benjamin-1.home (ANice-651-1-19-245.w86-203.abo.wanadoo.fr. [86.203.34.245]) by smtp.gmail.com with ESMTPSA id o2sm40604273wjo.3.2016.08.30.11.11.12 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Aug 2016 11:11:13 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [ZFS] ARC accounting bug ? From: Ben RUBSON In-Reply-To: <20160830133708.GD56297@in-addr.com> Date: Tue, 30 Aug 2016 20:11:12 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <234E7AF8-389C-4D27-82D1-81BF270D9376@gmail.com> References: <71DED907-10BE-44C2-982B-12974152895D@gmail.com> <20160830133708.GD56297@in-addr.com> To: FreeBSD FS X-Mailer: Apple Mail (2.3124) 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 18:11:16 -0000 > On 30 Aug 2016, at 15:37, Gary Palmer wrote: >=20 > 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()] =3D count();}' >> # dtrace -n 'sdt:zfs::arc-miss {@[execname, stack()] =3D count();}' >>=20 >> We can see that these are readdir calls which produce arc-misses, and = that readdir calls also produce arc-hits. >>=20 >> It would be interesting to know why some lead to hits, and some lead = to misses. >>=20 >> (note that ls -lR / rsync commands produces exactly the same dtrace = results/numbers as find command) >=20 > 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 investigated further, and found that : - readdir() first produces a miss when it returns the "." entry. - readdir() then does not produce any miss for the other entries. - readdir() finally produces a miss when it does not return any value = (no more entry). I also noted that misses are not produced every time, it seems to depend = on the folder content. It is possible to generate so many misses when using find in a loop on a = huge folder that if these misses were finally redirect to disks, zpool = iostat would show use some IOs. But this is not the case. It looks strange. Cache hits statistics can then be degraded even if there are no disk IOs = at all. > I am not familiar with ZFS, however UFS treats a directory as a = special=20 > 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. >=20 > If ZFS is similar, then the directory "file" reads would be misses and > the inode table reads would be hits >=20 > Regards, >=20 > Gary Thank you for your answer Gary ! Regards, Ben