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 85108D1B19B for ; Wed, 14 Jul 2004 11:32:47 -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 59875-05 for ; Wed, 14 Jul 2004 14:32:50 +0000 (GMT) Received: from frodo.hserus.net (frodo.hserus.net [204.74.68.40]) by svr1.postgresql.org (Postfix) with ESMTP id 67CF6D1B17B for ; Wed, 14 Jul 2004 11:32:41 -0300 (ADT) Received: from gateway.pspl.co.in ([203.199.147.2]:1774 helo=frodo.hserus.net) by frodo.hserus.net with asmtp (Cipher TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.34 #0) id 1BkkoU-0007yL-QE by authid with plain; Wed, 14 Jul 2004 20:02:51 +0530 Message-ID: <40F5440F.7080202@frodo.hserus.net> Date: Wed, 14 Jul 2004 20:02:47 +0530 From: Shridhar Daithankar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-15?Q?Herv=E9_Piedvache?= Cc: pgsql-performance@postgresql.org Subject: Re: Insert are going slower ... References: <200407131850.52095.herve@elma.fr> <003901c4698a$2cfb5a50$0100000a@wp2000> <40F50742.1000007@frodo.hserus.net> <200407141608.27116.herve@elma.fr> In-Reply-To: <200407141608.27116.herve@elma.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit 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/83 X-Sequence-Number: 7474 Hervé Piedvache wrote: > In my case it's a PostgreSQL dedicated server ... > > effective_cache_size = 5000000 > > For me I give to the planner the information that the kernel is able to cache > 5000000 disk page in RAM That is what? 38GB of RAM? > > >>free > > total used free shared buffers cached > Mem: 7959120 7712164 246956 0 17372 7165704 > -/+ buffers/cache: 529088 7430032 > Swap: 2097136 9880 2087256 > > What should I put ? 7165704 / 8 = 895713 So counting variations, I would say 875000. That is a 8GB box, right? So 875000 is about 7000MB. Which should be rather practical. Of course you can give it everything you can but that's upto you. Can you get explain analze for inserts? I think some foreign key check etc. are taking long and hence it accumulates. But that is just a wild guess. Off the top of my head, you have allocated roughly 48K shard buffers which seems bit on higher side. Can you check with something like 10K-15K? HTH Shridhar