Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C07F96324C0 for ; Thu, 5 Aug 2010 20:32:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 88286-08 for ; Thu, 5 Aug 2010 23:32:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.catalyst.net.nz (bertrand.catalyst.net.nz [202.78.240.40]) by mail.postgresql.org (Postfix) with ESMTP id 1488563258D for ; Thu, 5 Aug 2010 20:32:34 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.catalyst.net.nz (Postfix) with ESMTP id D8C8A31FFF for ; Fri, 6 Aug 2010 11:32:29 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at catalyst.net.nz Received: from mail.catalyst.net.nz ([127.0.0.1]) by localhost (bertrand.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mlatWvo6Mlmj for ; Fri, 6 Aug 2010 11:32:28 +1200 (NZST) Received: from [IPv6:2404:130:0:1000:222:15ff:fe5c:2471] (unknown [IPv6:2404:130:0:1000:222:15ff:fe5c:2471]) (Authenticated sender: mark.kirkwood) by mail.catalyst.net.nz (Postfix) with ESMTPSA id 39EDA31C4B for ; Fri, 6 Aug 2010 11:32:28 +1200 (NZST) Message-ID: <4C5B4A0C.5080508@catalyst.net.nz> Date: Fri, 06 Aug 2010 11:32:28 +1200 From: Mark Kirkwood User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Advice configuring ServeRAID 8k for performance References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/82 X-Sequence-Number: 39925 On 06/08/10 06:28, Kenneth Cox wrote: > I am using PostgreSQL 8.3.7 on a dedicated IBM 3660 with 24GB RAM > running CentOS 5.4 x86_64. I have a ServeRAID 8k controller with 6 > SATA 7500RPM disks in RAID 6, and for the OLAP workload it feels* > slow. I have 6 more disks to add, and the RAID has to be rebuilt in > any case, but first I would like to solicit general advice. I know > that's little data to go on, and I believe in the scientific method, > but in this case I don't have the time to make many iterations. > > My questions are simple, but in my reading I have not been able to > find definitive answers: > > 1) Should I switch to RAID 10 for performance? I see things like > "RAID 5 is bad for a DB" and "RAID 5 is slow with <= 6 drives" but I > see little on RAID 6. RAID 6 was the original choice for more usable > space with good redundancy. My current performance is 85MB/s write, > 151 MB/s reads (using dd of 2xRAM per > http://www.westnet.com/~gsmith/content/postgresql/pg-disktesting.htm). > Normally I'd agree with the others and recommend RAID10 - but you say you have an OLAP workload - if it is *heavily* read biased you may get better performance with RAID5 (more effective disks to read from). Having said that, your sequential read performance right now is pretty low (151 MB/s - should be double this), which may point to an issue with this controller. Unfortunately this *may* be important for an OLAP workload (seq scans of big tables). > 2) Should I configure the ext3 file system with noatime and/or > data=writeback or data=ordered? My controller has a battery, the > logical drive has write cache enabled (write-back), and the physical > devices have write cache disabled (write-through). > Probably wise to use noatime. If you have a heavy write workload (i.e so what I just wrote above does *not* apply), then you might find adjusting the ext3 commit interval upwards from its default of 5 seconds can help (I'm doing some testing at the moment and commit=20 seemed to improve performance by about 5-10%). > 3) Do I just need to spend more time configuring postgresql? My > non-default settings were largely generated by pgtune-0.9.3: > > max_locks_per_transaction = 128 # manual; avoiding "out of shared > memory" > default_statistics_target = 100 > maintenance_work_mem = 1GB > constraint_exclusion = on > checkpoint_completion_target = 0.9 > effective_cache_size = 16GB > work_mem = 352MB > wal_buffers = 32MB > checkpoint_segments = 64 > shared_buffers = 2316MB > max_connections = 32 > Possibly higher checkpoint_segments and lower wal_buffers (I recall someone - maybe Greg suggesting that there was no benefit in having the latter > 10MB). I wonder about setting shared_buffers higher - how large is the database? Cheers Mark