geom/gstat diplay bug?
Ulrich Spoerlein
uspoerlein at gmail.com
Thu Nov 23 02:02:15 PST 2006
Hi all,
one of our servers running FreeBSD 5.5 was seriously swapping (1.9GB
of 2GB swap used) and to see the performance of the ad0s1b device, I
fired up gstat. This is the current output (it has stopped swapping)
dT: 0.510 flag_I 500000us sizeof 240 i -1
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
0 31 0 0 0.0 31 255 0.4 1.3| ad0
0 31 0 0 0.0 31 255 0.4 1.3| ad0s1
1 49 0 0 0.0 49 6274 4.5 22.7| ad2
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a
4294967287 0 0 0 0.0 0 0 0.0 0.0| ad0s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d
0 31 0 0 0.0 31 255 0.5 1.4| ad0s1e
...
There are two possible explanations, AFAICT:
a) This is a dual CPU machine, so the L(q)++ and L(q)-- operations
were not strictly atomic, causing the counter to go -1.
b) or, the L(q) is computed by some addition/multiplication (doubtful)
and since the queue length was very, very long we got a integer
overflow.
Interesting thing is, that gstate decodes the queue length as an uint64_t value.
Ah, I see now, that L(q) is computed by end_count - start_count of
struct devstat. Of course, I had lots of "swap_pager_getswapspace(9):
failed" errors on the console, as the system was running out of swap
space. Are these transactions somehow counted wrong?
Uli
More information about the freebsd-stable
mailing list