Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2006 11:02:12 +0100
From:      "Ulrich Spoerlein" <uspoerlein@gmail.com>
To:        stable@freebsd.org
Subject:   geom/gstat diplay bug?
Message-ID:  <7ad7ddd90611230202kea1d4e8s697702c9843f6c91@mail.gmail.com>

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



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