Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id F2332634F15 for ; Tue, 3 Nov 2009 11:14:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 38132-02 for ; Tue, 3 Nov 2009 15:13:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id DC569634B65 for ; Tue, 3 Nov 2009 11:13:52 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 03 Nov 2009 09:13:51 -0600 Message-Id: <4AEFF447020000250002C19D@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.0 Date: Tue, 03 Nov 2009 09:13:43 -0600 From: "Kevin Grittner" To: "Grant Masan" , Subject: Re: Problem with database performance, Debian 4gb ram ? References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.59 tagged_above=-10 required=5 tests=AWL=0.009, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/19 X-Sequence-Number: 36187 Grant Masan wrote: > max_connections = 80 > shared_buffers = 512MB > temp_buffers = 8MB > work_mem = 20MB > maintenance_work_mem = 384MB > wal_buffers = 8MB > checkpoint_segments = 128MB > effective_cache_size = 2304MB > checkpoint_timeout = 1h Pending further information, these seem sane to me. > cpu_tuple_cost = 0.0030 > cpu_index_tuple_cost = 0.0010 > cpu_operator_cost = 0.0005 Why did you make these adjustments? I usually have to change the ratio between page and cpu costs toward the other direction. Unless you have carefully measured performance with and without these changes and found a clear win with these, I would recommend going back to the defaults for these three and tuning from there. > fsync = off Only use this if you can afford to lose all data in the database. (There are some situations where this is actually OK, but they are unusual.) As others have stated, though, we'd need more information to really give much useful advice. An EXPLAIN ANALYZE of a query which isn't performing to expectations would be helpful, especially if you include the table definitions (with indexes) of all tables involved in the query. Output from vmstat or iostat with a fairly small interval (I usually use 1) while the query is running would be useful, too. Knowing the exact version of PostgreSQL (like from SELECT version();) would be useful, as well as knowing more about you disk array and controller(s). -Kevin