From owner-freebsd-fs@freebsd.org Fri Aug 26 09:39:06 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 7DB4CA94DF6 for ; Fri, 26 Aug 2016 09:39:06 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 13DB3C75 for ; Fri, 26 Aug 2016 09:39:06 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id o80so10627123wme.0 for ; Fri, 26 Aug 2016 02:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:subject:message-id:date:to :mime-version; bh=IynC9BxDzgbhQCuyCdPZfPZ0+RHs6P0WsO20O5/CFmE=; b=bvNLiJ99dSSphUChg4jes5uwdnH5RyTi9pKrrWxZtztBYsubbTlFv5Q1SKp3eH9VAJ SjkpbzQUyb0nxmmUlteZ6WnipitoIW1bdDlykqmpW9b7QilDWdgavazS9Nrph4rlWXbs W7uJvp4acBWyBkDtbiyNKkoOhy0t8oHPLsEQCC3iT77CXjs5kBDkHLiC4Os6jFI3rlfd 4eo5RBp9sk/TY7IiV68Wxn54YggB0oN/LAJiC1z9a5NU0WRy5nJ5VYPu9hBGYeQWiK+Q WY0X4VhvA2WBJ//qVrmMv8jq5ljLbd29xmQ/b9NebL+CGPI3gSqmmllPgGzmeYKPIOKR Zwew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:subject :message-id:date:to:mime-version; bh=IynC9BxDzgbhQCuyCdPZfPZ0+RHs6P0WsO20O5/CFmE=; b=Rx3kiimoE1LU/n5evuEEeEef2BoQiraKQ2zM9b6dyI6juDADKxNanX3pa5AD+6yjpg AAYfLlhmxdf+2SDVk1QQwIyKkexa3TJx9Eul3GacHslklIU+32/raxdUnUecLWtbg4rE SHsomwYLqLHZTHVkkU9bgrOSkB38VfbkDZ7mzJMhPvHqmUVtXSwtCOSjswluofk5BbNh RbEI6RL5yPqS8VmnkOq56hmNg6/Yqt9JxJ1anFbcYRB2ChKGq5VWc1GDug6uQebFf01p LFFtkR6O3r7MkT/Eqn3vVSBk3X1PjgTMhMsS+DN+rMZNu9oNnnIljakoS4G1ijZddCJp /mdA== X-Gm-Message-State: AE9vXwOMtkGZf/TUA1wgPDS9SnChU2bUggXCl6TpOrns9GFaUzjJBym2QDyxI5jV/Jx+zg== X-Received: by 10.28.223.9 with SMTP id w9mr2874470wmg.65.1472204344290; Fri, 26 Aug 2016 02:39:04 -0700 (PDT) Received: from macbook-air-de-benjamin-1.home (ANice-651-1-185-161.w83-197.abo.wanadoo.fr. [83.197.121.161]) by smtp.gmail.com with ESMTPSA id a2sm19120685wjg.46.2016.08.26.02.39.03 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Aug 2016 02:39:03 -0700 (PDT) From: Ben RUBSON Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: [ZFS] ARC accounting bug ? Message-Id: Date: Fri, 26 Aug 2016 11:39:02 +0200 To: FreeBSD FS Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) 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: Fri, 26 Aug 2016 09:39:06 -0000 Hello, Before opening a bug report, I would like to know whether what I see is = "normal" or not, and why. ### Test : # zfs import mypool # zfs set primarycache=3Dmetadata mypool # while [ 1 ]; do find /mypool/ >/dev/null; done real 0m59.469s user 0m0.243s sys 0m3.184s real 0m1.445s user 0m0.181s sys 0m1.264s real 0m1.441s user 0m0.150s sys 0m1.291s (...) // then all results are equal to 0m1.4s # zfs-mon -a ZFS real-time cache activity monitor Seconds elapsed: 162 Cache hits and misses: 1s 10s 60s tot ARC hits: 79228 76030 73865 74953 ARC misses: 22510 22184 21647 21955 ARC demand data hits: 0 0 0 0 ARC demand data misses: 4 7 8 7 ARC demand metadata hits: 79230 76030 73865 74953 ARC demand metadata misses: 22506 22177 21639 21948 ZFETCH hits: 47 29 32 31 ZFETCH misses:101669 98138 95433 96830 Cache efficiency percentage: 10s 60s tot ARC: 77.41 77.34 77.34 ARC demand data: 0.00 0.00 0.00 ARC demand metadata: 77.42 77.34 77.35 ZFETCH: 0.03 0.03 0.03 ### Question : I don't understand why I have so many ARC misses. There is no other activity on the server (as soon as I stop the find = loop, no more ARC hits). As soon as the first find loop is done, there is no more disk activity = (according to zpool instate -v 1), no read/write operations on mypool. So I'm pretty sure all metadata comes from ARC. So why are there so many ARC misses ? Any clue ? An accounting bug ? Many thanks ! Ben