X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 217719DC81D for ; Tue, 21 Mar 2006 06:40:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34188-05 for ; Tue, 21 Mar 2006 06:40:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from linda-5.paradise.net.nz (bm-5a.paradise.net.nz [203.96.152.184]) by postgresql.org (Postfix) with ESMTP id 96B889DC84A for ; Tue, 21 Mar 2006 06:40:46 -0400 (AST) Received: from smtp-1.paradise.net.nz (tclsnelb1-src-1.paradise.net.nz [203.96.152.172]) by linda-5.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IWH006BM4C0DK@linda-5.paradise.net.nz> for pgsql-performance@postgresql.org; Tue, 21 Mar 2006 22:40:48 +1200 (NZST) Received: from [192.168.1.11] (218-101-28-245.dsl.clear.net.nz [218.101.28.245]) by smtp-1.paradise.net.nz (Postfix) with ESMTP id D068816A6C50; Tue, 21 Mar 2006 22:40:47 +1200 (NZST) Date: Tue, 21 Mar 2006 22:40:45 +1200 From: Mark Kirkwood Subject: Re: planner with index scan cost way off actual cost, In-reply-to: <20060321095049.GW15742@pervasive.com> To: "Jim C. Nasby" Cc: Guillaume Cottenceau , pgsql-performance@postgresql.org Message-id: <441FD82D.1040509@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051106) References: <87ek11gz69.fsf@meuh.mnc.lan> <441CDAAA.20609@paradise.net.nz> <87d5ghms3h.fsf@meuh.mnc.lan> <20060321095049.GW15742@pervasive.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.172 required=5 tests=[AWL=0.172] X-Spam-Score: 0.172 X-Spam-Level: X-Archive-Number: 200603/376 X-Sequence-Number: 17813 Jim C. Nasby wrote: > On Mon, Mar 20, 2006 at 09:35:14AM +0100, Guillaume Cottenceau wrote: > >>>shared_buffer = 12000 >>>effective_cache_size = 25000 >>> >>>This would mean you are reserving 100M for Postgres to cache relation >>>pages, and informing the planner that it can expect ~200M available >>>from the disk buffer cache. To give a better recommendation, we need >> >>Ok, thanks. I wanted to investigate this field, but as the >>application is multithreaded and uses a lot of postgres clients, >>I wanted to make sure the shared_buffers values is globally for >>postgres, not just per (TCP) connection to postgres, before >>increasing the value, fearing to take the whole server down. > > > shared_buffer is for the entire 'cluster', not per-connection or > per-database. > > Also, effective_cache_size of 25000 on a 1G machine seems pretty > conservative to me. I'd set it to at least 512MB, if not closer to > 800MB. I was going to recommend higher - but not knowing what else was running, kept it to quite conservative :-)... and given he's running java, the JVM could easily eat 512M all by itself! Cheers Mark