X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 50D759FB316 for ; Wed, 30 Aug 2006 19:56:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 52043-02 for ; Wed, 30 Aug 2006 22:56:37 +0000 (UTC) X-Greylist: delayed 00:31:21.654698 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id BFA1A9FB35F for ; Wed, 30 Aug 2006 19:56:35 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from scorpion.sorbs.net (scorpion.sorbs.net [203.15.51.56]) by svr4.postgresql.org (Postfix) with ESMTP id 96A5B5AF887 for ; Wed, 30 Aug 2006 22:25:12 +0000 (GMT) Received: from scorpion.sorbs.net (localhost [127.0.0.1]) by scorpion.sorbs.net (Postfix) with ESMTP id 1F786A6CA2 for ; Thu, 31 Aug 2006 08:24:59 +1000 (EST) Received: from mail.sorbs.net (mail.sorbs.net [203.15.51.62]) by scorpion.sorbs.net (Postfix) with ESMTP id C24B4A6C2D for ; Thu, 31 Aug 2006 08:24:58 +1000 (EST) Received: from [10.200.254.98] (oblivion.isux.com [203.173.10.62]) by nemesis.sorbs.net (iPlanet Messaging Server 5.2 HotFix 2.05 (built Mar 3 2005)) with ESMTPSA id <0J4U00L050XHWS@nemesis.sorbs.net> for pgsql-performance@postgresql.org; Thu, 31 Aug 2006 08:24:58 +1000 (EST) Date: Thu, 31 Aug 2006 08:17:46 +1000 From: Matthew Sullivan Subject: Re: performance problems. In-reply-to: To: pgsql-performance@postgresql.org Message-id: <44F60E8A.9090700@sorbs.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050415 References: <44F55A7F.40305@sorbs.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.069 tagged_above=0 required=5 tests=SPF_NEUTRAL X-Spam-Level: * X-Archive-Number: 200608/485 X-Sequence-Number: 20670 Vivek Khera wrote: > > On Aug 30, 2006, at 5:29 AM, Matthew Sullivan wrote: > >> The hardware is a Compaq 6400r with 4G of EDO RAM, 4x500MHz Xeons >> and a Compaq RAID 3200 in RAID 5 configuration running across 3 >> spindles (34G total space). >> >> The OS is FreeBSD 5.4-RELEASE-p14 >> The PG Version is 8.1.3 > > > What else does this box do? Notihing - it's the developement DB and is dedicated to the development website - which has a total number of users of '1' ;-) > I think you should try these settings, which I use on 4GB dual > Opteron boxes running FreeBSD 6.x dedicated to Postgres only. Your > effective_cache_size seems overly optimistic for freebsd. cranking > up the shared buffers seems to be one of the best bangs for the buck > under pg 8.1. I recently doubled them and nearly tripled my > performance on a massive write-mostly (insert/update) load. Unless > your disk system is *really* slow, random_page_cost should be reduced > from the default 4. I'll give this a try. > > As you can see, I change *very* little from the default config. > > > shared_buffers = 70000 # min 16 or > max_connections*2, 8KB each > work_mem = 262144 # min 64, size in KB > maintenance_work_mem = 524288 # min 1024, size in KB > > checkpoint_segments = 256 > checkpoint_timeout = 900 > > effective_cache_size = 27462 # `sysctl -n vfs.hibufspace` > / 8192 (BLKSZ) > random_page_cost = 2 > > if you're feeling adventurous try these to reduce the checkpoint > impact on the system: > > bgwriter_lru_percent = 2.0 > bgwriter_lru_maxpages = 40 > bgwriter_all_percent = 0.666 > bgwriter_all_maxpages = 40 > That might have some impact on the production server (which is also running PG - but the old DB and RT3) however the new DB is only me in devel, so I think that it will not have much of an effect (I'll still try it though) Regards, Mat