X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D59529FA16E for ; Mon, 29 May 2006 11:33:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 14268-03-3 for ; Mon, 29 May 2006 11:33:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from swordfish.dnsvelocity.com (swordfish.dnsvelocity.com [216.67.224.90]) by postgresql.org (Postfix) with ESMTP id A0F1E9FA2C7 for ; Mon, 29 May 2006 11:33:47 -0300 (ADT) Received: from [24.87.22.207] (port=4446 helo=chris) by swordfish.dnsvelocity.com with esmtpa (Exim 4.52) id 1Fkio7-00089L-Jo; Mon, 29 May 2006 15:33:23 +0100 Message-ID: <010201c6832c$d6ab7b80$6401a8c0@chris> From: "Cstdenis" To: "Markus Schaber" Cc: References: <03e001c67b99$8321f010$6401a8c0@chris> <4471D915.3010109@logix-tt.com> Subject: Re: How can I make this query faster (resend) Date: Mon, 29 May 2006 07:33:18 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - swordfish.dnsvelocity.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - voicio.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/515 X-Sequence-Number: 19302 (re-sending because my first one forgot the CC to the list. Sorry) I moved my database to a more powerful server. Mirrored ultra 320 SCSI HDs and 2GB of ram. It performs much faster. I also changed some conf settings accordingly work_mem = 10240 shared_buffers = 25600 max_connections = 450 (Also moved the webserver and needed more connections during the DNS propagation). I've been looking into pgpool. If I understand things correctly I can have persistent connections from all 256 apache processes to a pgpool and it can have like 30 persistent connections to the actual server thus saving lots of server memory (due to very high concurrency I would probably actually use at least 100) Is this correct? However, memory doesn't seem to be my problem anymore, the query is still taking longer than I'd like for the larger categories (6 seconds for one with 1300 pictures) but its more managable. The problem now is that my server's load average during peak hours has gone as high as 30 (tho the server seems to still be responding fairly quickly it still worrysome) Given my new server specs can anyone suggest any other config file improvements? Perhaps some of the *_cost variables could be adjusted to better reflect my server's hardware? ----- Original Message ----- From: "Markus Schaber" To: "Cstdenis" Cc: Sent: Monday, May 22, 2006 8:30 AM Subject: Re: [PERFORM] How can I make this query faster (resend) > Hi, Cstendis, > > Cstdenis wrote: > > > Server is a dual xeon with a gig of ram dedicated mostly to postgresql. > > Here is the changed lines in my postgresql.conf: http://pastebin.ca/57222 > > 3M is really low for a production server. > > Try using pg_pool and limiting it to about 30 or so backend connections, > and then give them at least 30 megs of RAM each. > > This should also cut down the connection creation overhead. > > HTH, > Markus > -- > Markus Schaber | Logical Tracking&Tracing International AG > Dipl. Inf. | Software Development GIS > > Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org >