Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 407149FA282 for ; Thu, 30 Nov 2006 21:47:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 59499-07 for ; Thu, 30 Nov 2006 21:47:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp5.clear.net.nz (smtp5.clear.net.nz [203.97.33.68]) by postgresql.org (Postfix) with ESMTP id 42A3B9FA17A for ; Thu, 30 Nov 2006 21:47:32 -0400 (AST) Received: from [192.168.1.11] (218-101-28-65.dsl.clear.net.nz [218.101.28.65]) by smtp5.clear.net.nz (CLEAR Net Mail) with ESMTP id <0J9K0092GNN1SN70@smtp5.clear.net.nz> for pgsql-performance@postgresql.org; Fri, 01 Dec 2006 14:47:26 +1300 (NZDT) Date: Fri, 01 Dec 2006 14:47:24 +1300 From: Mark Kirkwood Subject: Re: Bad iostat numbers In-reply-to: To: carlos.reimer@opendb.com.br Cc: pgsql-performance@postgresql.org Message-id: <456F89AC.9070207@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT References: User-Agent: Thunderbird 1.5.0.8 (X11/20061129) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/283 X-Sequence-Number: 22053 Carlos H. Reimer wrote: > While collecting performance data I discovered very bad numbers in the > I/O subsystem and I would like to know if I´m thinking correctly. > > Here is a typical iostat -x: > > > avg-cpu: %user %nice %system %iowait %idle > > 50.40 0.00 0.50 1.10 48.00 > > > > Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s > avgrq-sz avgqu-sz await svctm %util > > sda 0.00 7.80 0.40 6.40 41.60 113.60 20.80 > 56.80 22.82 570697.50 10.59 147.06 100.00 > > sdb 0.20 7.80 0.60 6.40 40.00 113.60 20.00 > 56.80 21.94 570697.50 9.83 142.86 100.00 > > md1 0.00 0.00 1.20 13.40 81.60 107.20 40.80 > 53.60 12.93 0.00 0.00 0.00 0.00 > > md0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 > 0.00 0.00 0.00 0.00 0.00 0.00 > > > > Are they not saturated? > They look it (if I'm reading your typical numbers correctly) - %util 100 and svctime in the region of 100 ms! On the face of it, looks like you need something better than a RAID1 setup - probably RAID10 (RAID5 is probably no good as you are writing more than you are reading it seems). However read on... If this is a sudden change in system behavior, then it is probably worth trying to figure out what is causing it (i.e which queries) - for instance it might be that you have some new queries that are doing disk based sorts (this would mean you really need more memory rather than better disk...) Cheers Mark