Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Dec 1995 02:18:10 +0100 (MET)
From:      Mattias.Gronlund@sa.erisoft.se (Mattias Gronlund)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: iostat and msps
Message-ID:  <9512250118.AA04344@sws021.sa.erisoft.se>
In-Reply-To: <199512231718.EAA30318@godzilla.zeta.org.au> from "Bruce Evans" at Dec 24, 95 04:18:57 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> >  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9512250118.AA04344>