From owner-freebsd-hackers Sun Dec 24 17:19:05 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA18700 for hackers-outgoing; Sun, 24 Dec 1995 17:19:05 -0800 (PST) Received: from mailgate.ericsson.se (mailgate.ericsson.se [130.100.2.2]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA18681 for ; Sun, 24 Dec 1995 17:19:01 -0800 (PST) Received: from sa.erisoft.se (epls01.sa.erisoft.se [150.132.128.1]) by mailgate.ericsson.se (8.6.11/1.0) with SMTP id CAA11411; Mon, 25 Dec 1995 02:18:43 +0100 Received: from sws021.sa.erisoft.se by sa.erisoft.se (4.1/SMI-4.1-ERIS0.99) id AA14658; Mon, 25 Dec 95 02:18:44 +0100 From: Mattias.Gronlund@sa.erisoft.se (Mattias Gronlund) Received: by sws021.sa.erisoft.se (5.x/client-1.3) id AA04344; Mon, 25 Dec 1995 02:18:11 +0100 Message-Id: <9512250118.AA04344@sws021.sa.erisoft.se> Subject: Re: iostat and msps To: bde@zeta.org.au (Bruce Evans) Date: Mon, 25 Dec 1995 02:18:10 +0100 (MET) Cc: freebsd-hackers@freebsd.org In-Reply-To: <199512231718.EAA30318@godzilla.zeta.org.au> from "Bruce Evans" at Dec 24, 95 04:18:57 am X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk > > > I have been trying to use iostat to check how busy a my disks are, but > >the scsi-disk whant give me a value for msps. After lookung in the > >source I found that the sd device didn't implement dk_busy flag. > > Right, wd is the only driver that implements it in FreeBSD-current. > > >After that I did a simple implementation of db_busy I found that > >iostat used dk_wpms to calculate msps but dk_wpms is a constant, why > >is that?? > > The correct value isn't readily available, and the simple calculations > for calculating msps don't work very well with intelligent drives, so > not much effort should be spent to find the correct value. 10MB/sec > might be a better constant value than 4MB/sec for current drives. > > >So my question is, why try to calculate msps from a constat that what > >I guess seldom have a value even near the corrspondign value for the > >drive?? wouldn't it be better just to give a value that says how many > >percent of the time the drive where busy? > > The current method does measure something dynamic. The transfer rate > usually only depends on the drive. The total time busy can be measured > fairly accurately. It's the number of seeks that can't be measured. > The driver has no way of knowing which seeks are physical because it > doesn't know what the drive is doing. Some seeks might be no-ops > because all the relevant data is cached. Other seeks might be no-ops > because the drive reorders i/o's. OK, if we can't calculate msps on new disk's, what is the reason for it to still exist? Is is to prevent scripts that use iostat from bailing out, if so what about implementing an extra switch that whould give exstended statistics? > > >An other question that arise when I implemented dk_busy for the sd > >driver was what happen i I have more disks than DK_NDRIVE drives? > >shouldn't the dk_xxx variabels be better to have dynamic? > > Lots of things would break even if DK_NDRIVE only increased. systat > output wouldn't fit in 80 columns... So, I have checked, the only system binaries that uses the dk_xxx variables from /dev/kmem is systat and iostat and I guess that it should be possible to fix them if they break :-)... But if one should create a dynamic implementation of the dk_xxx statistics ( What do dk stand for? ) whouldn't it be better to use sysctl then /dev/kmem? Is it possible that an dynamic implementation of thous statistics could be intergrated into FreeBSD-current? > > Bruce > Mattias