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 36C92D1B380 for ; Mon, 26 Jul 2004 11:46:50 -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 29017-02 for ; Mon, 26 Jul 2004 14:46:47 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 6FF5AD1B17A for ; Mon, 26 Jul 2004 11:46:35 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i6QEkZqb077688 for ; Mon, 26 Jul 2004 14:46:37 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i6QEKS18073368 for pgsql-performance@postgresql.org; Mon, 26 Jul 2004 14:20:28 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.performance Subject: Re: Insert are going slower ... Date: Mon, 26 Jul 2004 16:20:15 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 70 Message-ID: <4105131F.9050005@bigfoot.com> References: <200407131850.52095.herve@elma.fr> <200407131010.30790.josh@agliodbs.com> <200407140142.11720.footcow@noos.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@pyrenet.fr To: =?ISO-8859-15?Q?Herv=E9_Piedvache?= User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en In-Reply-To: <200407140142.11720.footcow@noos.fr> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-performance@postgresql.org 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/169 X-Sequence-Number: 7560 Hervé Piedvache wrote: > Josh, > > Le mardi 13 Juillet 2004 19:10, Josh Berkus a écrit : > >>>What can I do to get better results ?? (configuration option, and/or >>>hardware update ?) >>>What can I give you to get more important informations to help me ? >> >>1) What PostgreSQL version are you using? > > > v7.4.3 > > >>2) What's your VACUUM, ANALYZE, VACUUM FULL, REINDEX schedule? > > > VACUUM FULL VERBOSE ANALYZE; > > Every day after the calculation I was talking about ... > > >>3) Can you list the non-default settings in your PostgreSQL.conf? >>Particularly, shared_buffers, sort_mem, checkpoint_segments, >>estimated_cache, and max_fsm_pages? > > sort_mem = 512000 This is too much, you are instructing Postgres to use 512MB for each backend ( some time each backend can use this quantity more then one ) > vacuum_mem = 409600 > max_fsm_pages = 50000000 > max_fsm_relations = 2000 50 milions ? HUG. what tell you postgres in the log after performing a vacuum full ? > max_files_per_process = 2000 > wal_buffers = 1000 > checkpoint_segments = 3 For massive insert you have to increase this number, pump it up to 16 > effective_cache_size = 5000000 5GB for 8 GB system is too much > random_page_cost = 3 on your HW you can decrease it to 2 and also decrease the other cpu costs Regards Gaetano Mendola BTW, I live in Paris too, if you need a hand...