From owner-freebsd-questions@FreeBSD.ORG Thu Nov 19 09:30:31 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 870881065676 for ; Thu, 19 Nov 2009 09:30:31 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 09CA78FC18 for ; Thu, 19 Nov 2009 09:30:30 +0000 (UTC) Received: by bwz5 with SMTP id 5so2313907bwz.3 for ; Thu, 19 Nov 2009 01:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=279k7dKE67gbpnWr6cOdQlywQkRcR8cjnKTZy2A4P0k=; b=TwaMIThCPn3zTVvqctNUMn237PDgTC571TnV62SVW84swH/GpeCAI+a25lSsO4VSiG qdi0+gRkOREewqqsp1QZW4Elxehnkw0OeU5cd/av+t4F8cgr7+a9HnePri+mYMjYUJJb THhjsc4ZdqFbtxTipztk4+XWA21mIdIl5eR7I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TDjjA9JDwIVMmRg0upKqj6NFZXbOn3N3FeFdRtwG7Jv/FZRsfNhMeNeJBSE3fwYdSk 5HUutvSDtQp14Mo/m5lLMz0TxKYF8UMvm0/UIZwxmAgEWGKejP9tFo/RylQn68pPEYGi SkOHrGRvsev80PQNBuJn3POoGn1wJ6eMuefL4= MIME-Version: 1.0 Received: by 10.239.139.154 with SMTP id t26mr1195486hbt.74.1258623029757; Thu, 19 Nov 2009 01:30:29 -0800 (PST) In-Reply-To: <560f92640911181259m37d2659w775fa3fafd9499b6@mail.gmail.com> References: <560f92640911181259m37d2659w775fa3fafd9499b6@mail.gmail.com> Date: Thu, 19 Nov 2009 09:30:29 +0000 Message-ID: From: krad To: Nerius Landys Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: questions@freebsd.org 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: Thu, 19 Nov 2009 09:30:31 -0000 2009/11/18 Nerius Landys > 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? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > If you are worried about disk io and your db isnt to big, but to big to fit into ram, get a SD drive and put the db data on it. If your db is to big to fit on a sensibly priced SD, and your machine is suitably speced you could look at creating a zfs pool with a SD configured as an l2arc. The SD will then cache the most accessed parts of the db, and can dramatically increase performance. I am assuming that you have optimized your code though as well, as this should be your 1st point of call