X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 38A01D1B20D for ; Sun, 18 Jul 2004 06:42:49 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75123-08 for ; Sun, 18 Jul 2004 09:42:53 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id B2FDAD1B1F8 for ; Sun, 18 Jul 2004 06:42:43 -0300 (ADT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i6I9goo15202; Sun, 18 Jul 2004 11:42:50 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i6I9goX18085; Sun, 18 Jul 2004 11:42:50 +0200 Message-ID: <40FA460C.5030108@bigfoot.com> Date: Sun, 18 Jul 2004 11:42:36 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: eleven@ludojad.itpp.pl, "pgsql-performance@postgresql.org" Subject: Re: High load average with PostgreSQL 7.4.2 on debian/ibm eserver. References: <20040629155537.GA5465@ludojad.itpp.pl> In-Reply-To: <20040629155537.GA5465@ludojad.itpp.pl> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/116 X-Sequence-Number: 7507 eleven@ludojad.itpp.pl wrote: > Whole config is available here: > http://ludojad.itpp.pl/~eleven/pg-high-load.conf effective_cache_size = 4000 # typically 8KB each #random_page_cost = 4 # units are one sequential page fetch cost #cpu_tuple_cost = 0.01 # (same) #cpu_index_tuple_cost = 0.001 # (same) #cpu_operator_cost = 0.0025 # (same) These values are too higher for your hardware, try to execute the explain analyze for the queries that are running on your box and repeat it lowering these values, I bet postgres is running seq scan instead of an index scan. These are the value that I use for a configuration closer to your: effective_cache_size = 20000 random_page_cost = 2.0 cpu_tuple_cost = 0.005 cpu_index_tuple_cost = 0.0005 cpu_operator_cost = 0.0025 last question, do you use the autovacuum daemon ? If no => you have to use it If yes => did you apply the patch that will not fail with big tables like yours ? if you can post the autovacuum daemon log ( last lines ). Regards Gaetano Mendola