From owner-freebsd-fs@FreeBSD.ORG Wed Feb 20 11:16:59 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2F26C597 for ; Wed, 20 Feb 2013 11:16:59 +0000 (UTC) (envelope-from borjam@sarenet.es) Received: from proxypop04.sare.net (proxypop04.sare.net [194.30.0.65]) by mx1.freebsd.org (Postfix) with ESMTP id EB058844 for ; Wed, 20 Feb 2013 11:16:58 +0000 (UTC) Received: from [172.16.2.2] (izaro.sarenet.es [192.148.167.11]) by proxypop04.sare.net (Postfix) with ESMTPSA id E74859DF0E2 for ; Wed, 20 Feb 2013 12:16:56 +0100 (CET) From: Borja Marcos Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: ZFS, lies and statistics Date: Wed, 20 Feb 2013 12:16:53 +0100 Message-Id: To: FreeBSD Filesystems Mime-Version: 1.0 (Apple Message framework v1085) X-Mailer: Apple Mail (2.1085) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 11:16:59 -0000 Hi :) Still working on polishing devilator to graph some meaningul ZFS = statistics. I have been peeking at the ZFS statistics. In RELENG-9.2 it=B4s a bit = confusing, as there are two different sets of statistics: Some are under vfs.zfs (I think the following ones are relevant): vfs.zfs.l2c_only_size: 36603866112 vfs.zfs.mfu_ghost_data_lsize: 730375168 vfs.zfs.mfu_ghost_metadata_lsize: 1075240960 vfs.zfs.mfu_ghost_size: 1805616128 vfs.zfs.mfu_data_lsize: 1785933312 vfs.zfs.mfu_metadata_lsize: 373835264 vfs.zfs.mfu_size: 2198305792 vfs.zfs.mru_ghost_data_lsize: 550150656 vfs.zfs.mru_ghost_metadata_lsize: 1859320320 vfs.zfs.mru_ghost_size: 2409470976 vfs.zfs.mru_data_lsize: 503643648 vfs.zfs.mru_metadata_lsize: 105602560 vfs.zfs.mru_size: 800031744 vfs.zfs.anon_data_lsize: 0 vfs.zfs.anon_metadata_lsize: 0 vfs.zfs.anon_size: 673792 vfs.zfs.arc_meta_used: 2087455400 and of course the new kstat tree. But there is a discrepancy between the information provided by both, or = I am missing something. Having a look at these samples (this is updated from my test system, so = anyone interested can have a look at the progress), I have tried to = obtain a good graph of the ARC breakdown using two different approaches = (one borrowed from the Solaris version of arcstats.pl, which makes this = calculation,=20 mru_size =3D ARCSTATS_P; if ( ARCSTATS_SIZE > ARCSTATS_C ) mfu_size =3D ARCSTATS_SIZE - mru_size; else mfu_size =3D ARCSTATS_C - mru_size; add_output_u64("zfs_mfu_size", mfu_size); add_output_u64("zfs_mru_size", mru_size); and, on the other hand, I'm using the sized directly provided by = vfs.zfs, which turn out to be different. Which one would be the best? Thanks, Borja.