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 6D21C52997 for ; Thu, 11 Aug 2005 10:01:17 -0300 (ADT) 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 06248-08 for ; Thu, 11 Aug 2005 13:01:15 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id 30E01529F5 for ; Thu, 11 Aug 2005 10:01:14 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id CC416414567; Thu, 11 Aug 2005 14:01:08 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id E9AA115EDB; Thu, 11 Aug 2005 13:55:28 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01250-01; Thu, 11 Aug 2005 13:55:24 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 58A0D15ED9; Thu, 11 Aug 2005 13:55:24 +0100 (BST) Message-ID: <42FB4ABB.1010305@archonet.com> Date: Thu, 11 Aug 2005 13:55:23 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: paul@oxton.com Cc: pgsql-performance@postgresql.org Subject: Re: PG8 Tuning References: <1536.217.45.209.171.1123763001.squirrel@www.gradwell.com> In-Reply-To: <1536.217.45.209.171.1123763001.squirrel@www.gradwell.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.057 tagged_above=0 required=5 tests=[AWL=0.007, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/118 X-Sequence-Number: 13865 Paul Johnson wrote: > Hi all, we're running PG8 on a Sun V250 with 8GB RAM and 2*1.3GHz SPARC > CPUs running Solaris 10. The DB cluster is on an external fibre-attached > Sun T3 array that has 9*36GB drives configured as a single RAID5 LUN. > > The system is for the sole use of a couple of data warehouse developers, > hence we are keen to use 'aggressive' tuning options to maximise > performance. > > So far we have made the following changes and measured the impact on our > test suite: > > 1) Increase checkpoint_segments from 3 to 64. This made a 10x improvement > in some cases. OK > 2) Increase work_mem from 1,024 to 524,288. Don't forget you can use multiples of this in a single query. Might want to reign it back a bit. I *think* you can set it per-query if you want anyway. > 3) Increase shared_buffers from 1,000 to 262,143 (2 GB). This required > setting SHMMAX=4294967295 (4 GB) in /etc/system and re-booting the box. > > Question - can Postgres only use 2GB RAM, given that shared_buffers can > only be set as high as 262,143 (8K pages)? Well, normally you'd want to keep a fair bit for the O.S. to cache data. One quarter of your RAM seems very high. Did you try 5000,10000,50000 too or go straight to the top end? > So far so good... > > 4) Move /pg_xlog to an internal disk within the V250. This has had a > severe *negative* impact on performance. Copy job has gone from 2 mins to > 12 mins, simple SQL job gone from 1 min to 7 mins. Not even run long SQL > jobs. > > I'm guessing that this is because pg_xlog has gone from a 9 spindle LUN to > a single spindle disk? The key limitation will be one commit per rotation of the disk. Multiple spindles, or better still with a battery-backed write-cache will give you peak transactions. > In cases such as this, where an external storage array with a hardware > RAID controller is used, the normal advice to separate the data from the > pg_xlog seems to come unstuck, or are we missing something? Well, I think the advice then is actually "get 2 external arrays..." -- Richard Huxton Archonet Ltd