From owner-freebsd-fs@FreeBSD.ORG Fri Dec 2 15:45:07 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2C70106567C for ; Fri, 2 Dec 2011 15:45:07 +0000 (UTC) (envelope-from peter.maloney@brockmann-consult.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 4F5708FC19 for ; Fri, 2 Dec 2011 15:45:06 +0000 (UTC) Received: from [10.3.0.26] ([141.4.215.32]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0M5xYf-1QZAW83vKr-00xv4N; Fri, 02 Dec 2011 16:45:06 +0100 Message-ID: <4ED8F281.10903@brockmann-consult.de> Date: Fri, 02 Dec 2011 16:45:05 +0100 From: Peter Maloney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <4ED8D7A5.7090700@icritical.com> <4ED8EC9A.2080706@icritical.com> <20111202153624.GA28715@icarus.home.lan> In-Reply-To: <20111202153624.GA28715@icarus.home.lan> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:J/8HlKlCEGATAlAWFqBFylobQP4IKSnctfdj4vh0b+8 j4h6htmygRWwqcMbdJJAvCvmBKI0/kwW2jgtmp/Oq/yttvCCom WnOOeegNU4SZxrUXQO9fIAh8ltYOyGh3ecJU/rqxlw1+bDQsC4 xTqMI+H9j6oZ5BiuQxj0zmucrFCiyiB0ErOjonbnK9E1P7/RF8 dd0QA/TQQj/fuGY48bomNo4I63ytAZYSUu0mSpLrPJkqWuiKOL yNaQCvK2HLMEwOS3m7piaraR8tXN/QAspXDjMv2fMQt3iKv7wO w95XI9lCJQEq8sBI52JDYYhr+Nv5imrDZYRrVtYXVdO5O/VrW7 cy34+rvWdLyOrZtH/E16phF45HoFFrTjUd62zQ/Gi Subject: Re: Monitoring ZFS IO X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 15:45:07 -0000 On 12/02/2011 04:36 PM, Jeremy Chadwick wrote: > On Fri, Dec 02, 2011 at 03:19:54PM +0000, Matt Burke wrote: >> On 12/02/11 14:47, Ronald Klop wrote: >>> while true; do gstat -b -I 1s; done >> Looks like I wasn't clear about what I'm after - sorry. >> >> I want to see how many bytes or KB have been read and written to a given >> zpool since creation (as in the newer of uptime or zpool creation) on the >> system. >> >> For instance I want this data: >> >> # time iostat -Idx >> extended device statistics >> device r/i w/i kr/i kw/i wait svc_t %b >> mfid0 284807.0 5469251.0 4452202.0 116634996.0 0 0.8 0 >> mfid1 284576.0 5466322.0 4474976.5 116510280.0 0 0.8 0 >> mfid2 278686.0 5450269.0 4418703.0 116511709.0 0 0.8 0 >> mfid3 281673.0 5452757.0 4439770.5 116560910.5 0 0.8 0 >> mfid4 279549.0 5472177.0 4440227.0 116609067.0 0 0.8 0 >> mfid5 282625.0 5464261.0 4503257.5 116608801.5 0 0.8 0 >> mfid6 275635.0 5470654.0 4433529.0 116616131.5 0 0.8 0 >> ... >> mfid27 302950.0 5464880.0 4434398.0 116542100.0 0 0.7 0 >> mfid28 281464.0 5459410.0 4461678.5 116595780.5 0 0.8 0 >> mfid29 277535.0 5468784.0 4443352.5 116642932.0 0 0.8 0 >> ... >> real 0m0.003s >> user 0m0.000s >> sys 0m0.007s >> >> >> For the zpool as a singular entitiy (or even by zfs filesystem), but not >> for the individual disks. >> >> Hope this clarifies my request a bit > To my knowledge this kind of data is not kept/available in ZFS (FreeBSD > or Solaris). What you're wanting (truly) are counters rather than > averages, and you can do the averaging yourself (if wanted). "zpool > iostat" does not do this. Couldn't something like this be added easily to the zfs kernel module, so it can be viewed with something like "sysctl -a | grep kstat.zfs.vdevstats"? > With most utilities like iostat, mpstat, zpool iostat, gstat, vmstat, > and others of this nature, the established method/model/norm is that you > always provide an interval and you ignore the first sample/set of data > shown. In iostat's case on FreeBSD, it provides you an average over the > entire system uptime. Other utilities do not work this way. > > Even if "zpool iostat" behaved like your above iostat example, you'd > still run into the problem I described in my other mail (which is that > you get human-readable output, not actual integers/floats, and you > therefore have to do math to turn the values into integers, which sounds > easy but isn't, and you lose granularity/accuracy too). > > I cannot explain why "zpool iostat" (note no interval argument!) shows > some reads/writes. For example, on my systems, the following loop: > > while true; do zpool iostat; done > > ...literally returns the same data over and over, no matter what is > going on with he pools (reads or writes). I'm sure someone can explain > this behaviour, but it reminds me of systems where running "vmstat 1" > shows "crazy" values for the first interval, but the 2nd and onward > are accurate. > -- -------------------------------------------- Peter Maloney Brockmann Consult Max-Planck-Str. 2 21502 Geesthacht Germany Tel: +49 4152 889 300 Fax: +49 4152 889 333 E-mail: peter.maloney@brockmann-consult.de Internet: http://www.brockmann-consult.de --------------------------------------------