From owner-freebsd-questions@FreeBSD.ORG Wed Nov 7 18:11:46 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EEFE16A417 for ; Wed, 7 Nov 2007 18:11:46 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 2C61E13C4B2 for ; Wed, 7 Nov 2007 18:11:45 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id lA7IBFwj020741; Wed, 7 Nov 2007 12:11:15 -0600 (CST) (envelope-from dan) Date: Wed, 7 Nov 2007 12:11:14 -0600 From: Dan Nelson To: Andrea Venturoli Message-ID: <20071107181114.GC6238@dan.emsphone.com> References: <4731E6BC.6050703@netfence.it> <54da514e0711070847r2f4f1698w9ed28ca7c5d21f73@mail.gmail.com> <4731F8B7.9090003@netfence.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4731F8B7.9090003@netfence.it> X-OS: FreeBSD 7.0-BETA1 User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Doug Clements , freebsd-questions@freebsd.org Subject: Re: Best way to measure disk bandwidth usage X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2007 18:11:46 -0000 In the last episode (Nov 07), Andrea Venturoli said: > Doug Clements ha scritto: > >> gstat, iostat, and systat -vm are the tools I use for this. > > Thanks for the fast answer. > A couple more questions: > > gstat gives percentage values: what are these and how are they > computed? In the man page I can find no answer. Both gstat's and "iostat -x"'s %busy column is just an indicator of how often there was a pending request to the disks. If it's less than 100%, then you know the disk is idle some of the time. If it's 100%, however, that just means there's always at least one request on the queue. It doesn't mean the drive has hit any performance limits, though, since you can usually queue 32 or more commands to a single drive, and sequential requests complete a lot faster than random ones. A better indicator of overload is the command latency (ms/r in gstat or svc_t in iostat). > iostat is also expecially interesting, since it can run > non-interactively and I could poll it through cacti... However this > monitors only raw da devices. Is there a way to get gmirrors > monitored? I don't think any of the geom system hooks into devstat (which is where iostat gets its info). It'd sure be nice :) It would also allow you to query some stats via net-snmp's diskIO mib. > Finally this gives overall MB/s, which is very interesting, but I'd > also need to refer this to an end-of-scale value, in order to > understand if the disks are working to their fullest (and thus are > the bottleneck). Is this correct? Where could I desume such a value? > (I remember there was an utility... though I don't remember its > name). That really depends on your drives and the interfaces you use to connect them. For sata or sas drives, you could probably run each drive at its rated maximum speed (which will be different for each model; diskinfo -t can help here). For SCSI, FC, or drives hung off a raid controller, your bottleneck may be the speed of the shared interface or your pci bus, depending on how many drives you have connected. -- Dan Nelson dnelson@allantgroup.com