From owner-freebsd-current@FreeBSD.ORG Sat Apr 16 21:05:24 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 9F1E416A4CE for ; Sat, 16 Apr 2005 21:05:24 +0000 (GMT) Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [195.41.46.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29E8F43D1F for ; Sat, 16 Apr 2005 21:05:24 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x50a07c69.naenxx7.adsl-dhcp.tele.dk [80.160.124.105]) by pfepa.post.tele.dk (Postfix) with ESMTP id 86F7347FEB2 for ; Sat, 16 Apr 2005 23:05:22 +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 j3GL5HiD004282; Sat, 16 Apr 2005 23:05:18 +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:54:31 CDT." <42616D77.2070205@centtech.com> Date: Sat, 16 Apr 2005 23:05:17 +0200 Message-ID: <4281.1113685517@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 21:05:24 -0000 In message <42616D77.2070205@centtech.com>, Eric Anderson writes: >> 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. > >Why is that? I have a general notion, but I'd like to know more details. If >this is documented somewhere, just give me a pointer and I'll read away. Busy says how big a fraction of the time the disk had an outstanding request, but that doesn't tell you how much more traffic it would be able to sneak in without affecting the throughput of the current traffik. If you had a process doing essentially: while (1) { read_sector(0); write_sector(N-1); } That would give you 100% disk busy. But you can throw a lot more traffic at the disk without affecting (the abysmal) performance you already see, for instance you can probably read the first and last tracks of the disks for 100% free. The trouble is that %busy says something about how much of the time the disk had something to do, but says nothing about how much more the disk could have accomplished in the same time. >> 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. These on the other hand are what people really care about: how fast (or slow) will it be to access the disk. If you run a disk benchmark you will notice that the service time has seismographic sensitivity, run a stupid access pattern and it explodes into the 100s of milliseconds. >Is there a place to grab those stats in a more 'script friendly' >way? I am the author of a (rather cheesy) tool called bsdsar, and >I'm thinking about updating it with all the new cool 5.X-isms. Go for it. There is a pretty simple API to pull it out of the kernel, check the gstat source. -- 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.