Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Dec 1995 04:18:57 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        Mattias.Gronlund@sa.erisoft.se, freebsd-hackers@freebsd.org
Subject:   Re: iostat and msps
Message-ID:  <199512231718.EAA30318@godzilla.zeta.org.au>

next 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.

>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...

Bruce



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