X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F2FC25669B for ; Sat, 12 Mar 2005 03:50:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74148-07 for ; Sat, 12 Mar 2005 03:50:18 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.206]) by svr1.postgresql.org (Postfix) with ESMTP id 53F3C566BE for ; Sat, 12 Mar 2005 03:50:17 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 70so1161223wra for ; Fri, 11 Mar 2005 19:50:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=OKb3GUbmCsmx7wNIEFt01iALQbRGlGgDOYpD1mZ16Tyz6kKjbmOr3VfMEuq5U1i9+S8/Fju80oncdmvqXD3lPv8txJ9prd1gbiPRbPYHzowAg2tV9BcX8kpV3SGTEX+JJBivvFijxpxKEnLcivOg2zC6NRmce+7fqUyvunVld7g= Received: by 10.54.40.2 with SMTP id n2mr3017492wrn; Fri, 11 Mar 2005 19:50:20 -0800 (PST) Received: by 10.54.18.53 with HTTP; Fri, 11 Mar 2005 19:50:20 -0800 (PST) Message-ID: <33c6269f05031119506fee5c31@mail.gmail.com> Date: Fri, 11 Mar 2005 22:50:20 -0500 From: Alex Turner Reply-To: Alex Turner To: Arshavir Grigorian Subject: Re: Postgres on RAID5 Cc: pgsql-performance@postgresql.org In-Reply-To: <423209E1.6090200@m-cam.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <423209E1.6090200@m-cam.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.225 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/209 X-Sequence-Number: 10914 I would recommend running a bonnie++ benchmark on your array to see if it's the array/controller/raid being crap, or wether it's postgres. I have had some very surprising results from arrays that theoretically should be fast, but turned out to be very slow. I would also seriously have to recommend against a 14 drive RAID 5! This is statisticaly as likely to fail as a 7 drive RAID 0 (not counting the spare, but rebuiling a spare is very hard on existing drives). Alex Turner netEconomist On Fri, 11 Mar 2005 16:13:05 -0500, Arshavir Grigorian wrote: > Hi, > > I have a RAID5 array (mdadm) with 14 disks + 1 spare. This partition has > an Ext3 filesystem which is used by Postgres. Currently we are loading a > 50G database on this server from a Postgres dump (copy, not insert) and > are experiencing very slow write performance (35 records per second). > > Top shows that the Postgres process (postmaster) is being constantly put > into D state for extended periods of time (2-3 seconds) which I assume > is because it's waiting for disk io. I have just started gathering > system statistics and here is what sar -b shows: (this is while the db > is being loaded - pg_restore) > > tps rtps wtps bread/s bwrtn/s > 01:35:01 PM 275.77 76.12 199.66 709.59 2315.23 > 01:45:01 PM 287.25 75.56 211.69 706.52 2413.06 > 01:55:01 PM 281.73 76.35 205.37 711.84 2389.86 > [snip]