top io mode

Adam Vande More amvandemore at
Thu Nov 25 22:35:55 UTC 2010

On Thu, Nov 25, 2010 at 3:04 PM, Jeremy Chadwick
<freebsd at>wrote:

> Bad form to follow up to my own Email of course, but some discussion
> material:

I'm a frequent offender myself so I won't be pointing any fingers.

"top -m io" doesn't show any I/O writes, while gstat(8) does, and to
> numerous devices all which make up some form of ZFS pool.

Yes, it's a generic ZFS mirror.

If you do something like "dd if=/dev/urandom of=/pool/file bs=64k", does
> "top -m io" show write I/O for the "dd" process?

It does not on my ZFS STABLE system with Kostick's path.  So the patch fixes
reads, but not writes. cc'ing to notify in case he has more ideas.

It does on my UFS CURRENT VM w/ out the patch.

> If so, then possibly ZFS "internally" is doing something quietly/behind
> the scenes (such as a disk flush or some sort of internal transaction
> "thing"), thus the kernel would be responsible and not a process.

That was kind of my thought, and if that's the case there are two problems:

1.  Can't identify what's responsible for IO.
2.  Any money your company saves due to ZFS features is lost when you get
the electric bill. /sarcasm

So that said, how about "top -S -m io -U root" instead, which includes
> system processes, since we can (probably) assume a non-root process
> isn't responsible?

I should have mentioned I had already tried that (-HS) along with -o
read/write to see what was happening, but no luck.

Hopefully I don't get too confusing here because I'm going to contradict
something I said earlier.  The stats I posted from gstat are perhaps not
directly related to the root issue.  Similar stats to what I linked to from
gstats can be seen in approx 10 - 15 intervals and is 0.0 %busy in between
those updates.  However the HD indicator light blinks in 1 second intervals
constantly and this is what I want to track down.

One more datapoint is that in single user mode, the blinking stops.

sa(8) may suffer from the same affliction as a "dd if=/dev/zero of=/tmp/ bs=64k" had been running along with my constant blinking:

galacticdominator# sa -m
root                    30         0.00cpu            0tio        1972k*sec
adam                     6         0.27cpu            0tio        2254k*sec

Maybe it's some weird hardware issue, but there's at least one other FreeBSD
user who is seeing similar behavior.

Adam Vande More

More information about the freebsd-stable mailing list