From owner-freebsd-questions@FreeBSD.ORG Tue Nov 4 14:55:10 2008 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 7BFD51065678 for ; Tue, 4 Nov 2008 14:55:10 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id 4B04E8FC0A for ; Tue, 4 Nov 2008 14:55:10 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.ws.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id A96C3EBC09; Tue, 4 Nov 2008 09:55:09 -0500 (EST) Date: Tue, 4 Nov 2008 09:55:08 -0500 From: Bill Moran To: "Eduardo Meyer" Message-Id: <20081104095508.f231a7e2.wmoran@potentialtech.com> In-Reply-To: References: <20081104091801.ff0297b0.wmoran@potentialtech.com> X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: Disk top usage PIDs 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: Tue, 04 Nov 2008 14:55:10 -0000 In response to "Eduardo Meyer" : > On Tue, Nov 4, 2008 at 12:27 PM, Eduardo Meyer wrote: > > On Tue, Nov 4, 2008 at 12:18 PM, Bill Moran wrote: > >> In response to "Eduardo Meyer" : > >>> > >>> I have some serious issue. Sometimes something happens and my disk > >>> usage performance find its limit quickly. I follow with gstat and > >>> iostat -xw1, and everything usually happens just fine, with %b around > >>> 20 and 0 to 1 pending i/o request. Suddely I get 30, 40 pending > >>> requests and %b is always on 100% (or more than this). > >>> > >>> fstat and lsof gives me no hint, because the type of programs as well > >>> as the amount of 'em is just the same. > >>> > >>> How can I find the PID which is hammering my disk? Is there an "iotop" > >>> or "disktop" tool or something alike? > >> > >> top -m io -o total > > > > Great, thats exactly what I was looking for, thank you a lot Mr Moran. > > I see syncer (40%) and bufaemon (10%) and after that, imapd. The first > ones are kernel PIDs (36 and 37). > > PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND > 36 root 2 2 0 31 0 31 40.79% bufdaemon > 37 root 2 2 0 16 0 16 21.05% syncer > 71501 vmail 4 0 0 0 0 0 12.00% imapd > > I guess it a symptom of some hardware problems, kernel itself is not > supposed to do this many I/O, right? > > Sometimes PID 39, softdepflush, is always on top 3. Off the top of my head, it looks like you're exceeding what the hardware can do. What kind of disks do you have in that system? It may be time to get faster disks or expand to a high-performance RAID setup. -- Bill Moran http://www.potentialtech.com