From owner-freebsd-questions@FreeBSD.ORG Wed Nov 18 22:03:25 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3AF7106566B for ; Wed, 18 Nov 2009 22:03:25 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id B87AF8FC0A for ; Wed, 18 Nov 2009 22:03:25 +0000 (UTC) Received: by pxi12 with SMTP id 12so1077646pxi.3 for ; Wed, 18 Nov 2009 14:03:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=eQlveA+yYuEXz/6PHclwCewRMYm2ku/KoZLYKaQou3k=; b=wzR441YvDm/lA4niQHYXc1mi8ngj44NS0vBpbbx45Ns4pcMQCcD7RyW0MXMK6FOEpt rfdWCzy0b1s95HlTfZUJUdCahhPuIXLlfeZGzKY3Ox1J+MjDpgOFi6TOhN6rLvcRxEJF +R/H3egDJBCSA3KQYtqqc980gwhI0sEQCVgVQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=HtqWPehBi+EHDz5Gmo3Fe/R3jeppRFnl7giUHLhnHlejlq0mu+LxgmuyRN015y2wjc NmTR1bDl1Nb0scodKNZjKyTjkhde1ToRLVAzeqk+7ui6MptJSCuy+BXf9SdwgVXtOX2h a3lFu616clUhGer0RazwEy2oQp1klIJRuRXRI= MIME-Version: 1.0 Received: by 10.142.250.3 with SMTP id x3mr1377785wfh.23.1258581805255; Wed, 18 Nov 2009 14:03:25 -0800 (PST) In-Reply-To: <4B046D14.1070505@ibctech.ca> References: <560f92640911181259m37d2659w775fa3fafd9499b6@mail.gmail.com> <4B046D14.1070505@ibctech.ca> Date: Wed, 18 Nov 2009 16:03:25 -0600 Message-ID: <6201873e0911181403k218b9d1fheab768b21aa2cb19@mail.gmail.com> From: Adam Vande More To: Steve Bertrand Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org, Nerius Landys Subject: Re: Measuring disk I/O X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Nov 2009 22:03:26 -0000 On Wed, Nov 18, 2009 at 3:54 PM, Steve Bertrand wrote: > 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 > > ...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 > > Steve > > systat -io is a nice visualization. If you're really io bound there are some things you can do config wise to help. However if you really are pushing a lot data, you need to be running scsi or ssd drives. It takes A LOT of striped sata drives to match the performance of a single good 15K scsi. if you're able to run ahci, that will help some as well. -- Adam Vande More