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 622AF9FB31B for ; Thu, 10 Aug 2006 06:25:25 -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 62737-02 for ; Thu, 10 Aug 2006 09:25:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 75C699FB2FF for ; Thu, 10 Aug 2006 06:25:19 -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 830A873A0B; Thu, 10 Aug 2006 10:23:56 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 290FA15EA6; Thu, 10 Aug 2006 10:23:56 +0100 (BST) Message-ID: <44DAFB2B.4070307@archonet.com> Date: Thu, 10 Aug 2006 10:23:55 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Carl Youngblood Cc: pgsql-performance@postgresql.org Subject: Re: Beginner optimization questions, esp. regarding Tsearch2 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/181 X-Sequence-Number: 20366 Carl Youngblood wrote: > - I noticed that there are six different postmaster daemons running. > Only one of them is taking up a lot of RAM (1076m virtual and 584m > resident). The second one is using 181m resident while the others are > less than 20m each. Is it normal to have multiple postmaster > processes? You should have one master backend process and one per connection. PG is a classic multi-process designed server. > Even the biggest process doesn't seem to be using near as > much RAM as I have on this machine. Is that bad? What percentage of > my physical memory should I expect postgres to use for itself? How > can I encourage it to cache more query results in memory? OK - one of the key things with PostgreSQL is that it relies on the O.S. to cache its disk files. So, allocating too much memory to PG can be counterproductive. From your figures, you're allocating about 64MB to work_mem, which is per sort. So, a complex query could use several times that amount. If you don't have many concurrent queries that might be what you want. Also, you've allocated 1GB to your shared_buffers which is more than I'd use as a starting point. You've only mentioned one main table with 100,000 rows, so presumably you're going to cache the entire DB in RAM. So, you'll want to increase effective_cache_size and reduce random_page_cost. -- Richard Huxton Archonet Ltd