As BIll said, iowait as reported by mpstat et al is  zero on Solaris 10; iowait 
is only a useful metric on a uniprocessor machine, its value is not useful when 
there is more than one processor in the system. Since it's been the center of 
much confusion, it's been removed.

A better way would be to measure the time spent waiting of the thread of 
interest; i.e. look at the amount of time spent waiting for I/O by the "find" 
command. You can do this with DTrace quite easily:

sol10$ ./iowait.d 639 ^C 
Time breakdown (milliseconds):
 <on cpu> 2478 
 <I/O wait> 6326 
I/O wait breakdown (milliseconds):
file1 236 
file2 241 
file4 244 
file3 264 
file5 277 
file7 330 . . .

Regards,

Richard.



#!/usr/sbin/dtrace -s
# iotime.d
#

#pragma D option quiet

BEGIN
{
        printf("%10s %58s %2s %8s %10s\n", "DEVICE", "FILE", "RW", "Size", 
"Time");
        last = timestamp;
}

io:::start
{
        self->blkno = args[0]->b_blkno;
        self->dev   = args[0]->b_edev;
        self->flags   = args[0]->b_flags;
        blockio_start[self->dev, self->blkno] = timestamp;
        printf("%10s %58s %2s %8d %-10d\n",
            args[1]->dev_statname,
            args[2]->fi_pathname, args[0]->b_flags & B_READ ? "R" : "W",
            args[0]->b_bcount,
            (uint64_t)(timestamp - blockio_start[self->dev,
                self->blkno]) / 1000);
        last = timestamp;
}

io:::done
/       blockio_start[args[0]->b_edev,
        args[0]->b_blkno]/
{
        self->blkno = args[0]->b_blkno;
        self->dev   = args[0]->b_edev;
        printf("%10s %58s %2s %8d %-10d\n",
            args[1]->dev_statname,
            args[2]->fi_pathname, args[0]->b_flags & B_READ ? "R" : "W",
            args[0]->b_bcount,
            (uint64_t)(timestamp - blockio_start[self->dev,
                self->blkno]) / 1000);
        @a[self->dev] = lquantize((timestamp -
            blockio_start[self->dev, self->blkno]) / 1000,
                1000, 500000, 1000);
}
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to