Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Apr 2005 21:46:51 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Eric Anderson <anderson@centtech.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: gstat shows > 100% busy 
Message-ID:  <3703.1113680811@critter.freebsd.dk>
In-Reply-To: Your message of "Sat, 16 Apr 2005 14:37:25 CDT." <42616975.9060303@centtech.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <42616975.9060303@centtech.com>, Eric Anderson writes:

>Is gstat supposed to show > 100% sometimes?  What does that mean,
>or is it a bug?
>
>dT: 0.501  flag_I 500000us  sizeof 240  i -1
>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>     2    260    146  14912   10.7    114  14565    2.8  148.1| ad0
>     0      0      0      0    0.0      0      0    0.0    0.0| ad0s1

The reason gstat shows >100% busy is that there are some outstanding
requests. (the 2 in the left hand column).

I tried to make the statistics collection as cheap as possible, and
as a side effect some of the columns can be somewhat misleading.

The length of the queue "L(q)" can be plain wrong due to a race in
updating the counters and %busy can go over 100% while there are
outstanding requests.

The sysctl kern.geom.collectstats can be used to tune some aspects
of the statistics collection, but the %busy issue is just something
you have to live with.

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.

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.


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



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