Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Mar 1998 14:23:03 -0700 (MST)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        gpalmer@FreeBSD.ORG (Gary Palmer)
Cc:        scsi@FreeBSD.ORG
Subject:   Re: % utilisation
Message-ID:  <199803202123.OAA03375@panzer.plutotech.com>
In-Reply-To: <12091.890427760@gjp.erols.com> from Gary Palmer at "Mar 20, 98 04:02:40 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Gary Palmer wrote...
> 
> While working with the Sun boxes at work, I noticed that they seem to have
> a relatively accurate figure for % utilised for disk I/O statistics (not
> how much space is used on the disk). E.g. the vsar utility says:
> 
>     Disk  %busy   %avg  avque  await  aserv  nrd  avg  nwr  avg   rd(k)   wr(k)
>     Avg.  33.68  33.60    8.3    0.0   21.8  142  197  318  254    3848    3838
>            0.00   0.00    0.0    0.0    0.0    0    0    0    0       0       0
>          100.00  99.04   25.0    0.0   54.4  142  197  317  253    3848    3830
>   c0t3d0   1.05   1.74    0.0    0.0   10.9    0    0    1    1       0       8
> 
> How do they get the % figures? Any way we could do something similar?

	I'm not entirely sure how they get those figures, since I haven't
got access to Solaris source.  :)  (Yes, I know that if you're at a school
or something there is a way to get it...)

	In any case, I think there is a way we could do something similar.
The new statistics code ("devstat") I wrote keeps track of how long a disk
is busy.  It isn't a terribly useful measurement, but you could use it in
conjunction with the system uptime to rougly calculate what percentage of
the time the disk is busy.

	If you poll the value often enough, I suppose you could even get
numbers for individual periods of time.  The only catch is that the busy
time is only calculated when a disk goes idle.  That's fine for most
situations, but for an application where a disk stays pegged all the
time, it wouldn't be too helpful.  I considered trying to calculate the
busy time with a little finer granularity than that, but I decided it
wouldn't be worth the hassle, and might cause a performance hit.

	In any case, if you've got the CAM code, look at
sys/sys/devicestat.h and sys/kern/subr_devstat.c.  My intent is that the
devstat code will eventually replace the dk* stuff in all the drivers that
use it.  (and possibly some that don't currently use it)


Ken
-- 
Kenneth Merry
ken@plutotech.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



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