From owner-freebsd-current@FreeBSD.ORG Sat Apr 16 19:46:54 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9A4F16A4CE for ; Sat, 16 Apr 2005 19:46:54 +0000 (GMT) Received: from pfepc.post.tele.dk (pfepc.post.tele.dk [195.41.46.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B3F243D45 for ; Sat, 16 Apr 2005 19:46:54 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07c69.naenxx7.adsl-dhcp.tele.dk [80.160.124.105]) by pfepc.post.tele.dk (Postfix) with ESMTP id C3BFC262814 for ; Sat, 16 Apr 2005 21:46:52 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.3/8.13.3) with ESMTP id j3GJkpBj003704; Sat, 16 Apr 2005 21:46:52 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Eric Anderson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 16 Apr 2005 14:37:25 CDT." <42616975.9060303@centtech.com> Date: Sat, 16 Apr 2005 21:46:51 +0200 Message-ID: <3703.1113680811@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: FreeBSD Current Subject: Re: gstat shows > 100% busy X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2005 19:46:54 -0000 In message <42616975.9060303@centtech.com>, Eric Anderson writes: >Is gstat supposed to show > 100% sometimes? What does that mean, >or is it a bug? > >dT: 0.501 flag_I 500000us sizeof 240 i -1 > L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name > 2 260 146 14912 10.7 114 14565 2.8 148.1| ad0 > 0 0 0 0 0.0 0 0 0.0 0.0| ad0s1 The reason gstat shows >100% busy is that there are some outstanding requests. (the 2 in the left hand column). I tried to make the statistics collection as cheap as possible, and as a side effect some of the columns can be somewhat misleading. The length of the queue "L(q)" can be plain wrong due to a race in updating the counters and %busy can go over 100% while there are outstanding requests. The sysctl kern.geom.collectstats can be used to tune some aspects of the statistics collection, but the %busy issue is just something you have to live with. The reason why I don't want to spend cpu time on the %busy field is that it is useless as a performance indication for all modern disks and most ancient ones as well. The "ms/r" and "ms/w" give you the time it takes to send a transaction through (in milliseconds, for read and write respectively) and those are the numbers you should monitor. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.