Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Nov 2009 16:06:01 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Steve Bertrand <steve@ibctech.ca>
Cc:        questions@freebsd.org, Nerius Landys <nlandys@gmail.com>
Subject:   Re: Measuring disk I/O
Message-ID:  <20091118220601.GD89004@dan.emsphone.com>
In-Reply-To: <4B046D14.1070505@ibctech.ca>
References:  <560f92640911181259m37d2659w775fa3fafd9499b6@mail.gmail.com> <4B046D14.1070505@ibctech.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Nov 18), Steve Bertrand said:
> Nerius Landys wrote:
> > A friend and I are working on a small video-game related project as a
> > hobby.  We're running several scripts 24/7 that make lots of calls to a
> > MySQL database.  The mysql server process shows an average CPU use of 1%
> > (reported by top) and it never goes above about 2% The tables it's
> > hitting are myisam tables.  I'm a little bit worried that the mysql
> > process is using a lot of disk access.  I don't know too much about hard
> > disks but my feeling is that too much disk use could slow the machine
> > down or cause a premature hard disk failure.  WD Raptor model.
> > 
> > I don't know if my concerns are well-founded, but I would like to
> > measure impact on the hard disk somehow.  I don't know how to see disk
> > I/O.  I do know how to use top.  How do I measure disk I/O?  Any other
> > thoughts?
> 
> Perhaps gstat(8) will help you get started:
> 
> # gstat -a
> 
> dT: 1.001s  w: 1.000s
>  L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
>     4    176    114  10261   14.9     62    607   25.4   96.8| ar0
>     4    177    115  10389   17.8     62    607   26.5  100.0| ar0.eli
>     1     34     34    527   30.8      0      0    0.0   99.1| ar0.elie
>     2     66      4     16   20.5     62    607   26.6   98.0| ar0.elif
>     1     77     77   9845   12.1      0      0    0.0   93.0| ar0.elig

iostat -x gives similar output, although only to the device level, not the
slice.  There's also top's 'io' mode (press m), which will show per-process
i/o stats of varying usability (I/O to zfs doesn't seem to show up).
 
> ...or on ZFS:
> 
> # zpool iostat 1
> 
>                capacity     operations    bandwidth
> pool         used  avail   read  write   read  write
> ----------  -----  -----  -----  -----  -----  -----
> storage     1.39T   440G      0    771      0  96.4M
> storage     1.39T   440G      0  1.05K  4.42K   126M

-- 
	Dan Nelson
	dnelson@allantgroup.com



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