Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1C31B476454 for ; Fri, 20 Sep 2002 16:17:06 -0400 (EDT) Received: from negaverse.org (negaverse.org [207.127.234.151]) by postgresql.org (Postfix) with ESMTP id 7517347626E for ; Fri, 20 Sep 2002 16:17:05 -0400 (EDT) Received: (qmail 11170 invoked by uid 65534); 20 Sep 2002 20:16:29 -0000 Received: from 207.127.234.152 ( [207.127.234.152]) as user lucas@negaverse.org by wwwmail.negaverse.org with HTTP; Fri, 20 Sep 2002 16:16:29 -0400 Message-ID: <1032552989.3d8b821d44e78@wwwmail.negaverse.org> Date: Fri, 20 Sep 2002 16:16:29 -0400 From: Lucas Madar To: pgsql-admin@postgresql.org Subject: Problem with bulk inserts MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Negaverse Webmail / Internet Messaging Program (IMP) 3.1 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/289 X-Sequence-Number: 5828 I am running into a strange problem with postgresql when I attempt to insert 1200 rows per second into a database. The problem is not due to the machine (Dual Xeon 2.2ghz, 2GB, RAID 1/0, running FreeBSD 4.6.2-REL). Postgres consumes approximately 3 to 4% CPU time. Very little disk activity occurs (0.02MB/sec usually, sometimes there are bursts up to 5MB/sec). However, postgresql sits there and takes its time processing the insert queries, while not using any resources. This is leading to a huge backlog of insert queries. My configuration is as follows: shared_buffers = 32768 # 32768 * 8192 = 256MB sort_mem = 33554432 # 16mb of memory vacuum_mem = 134217728 # 128mb of memory fsync = false Turning 'fsync' on or off does not seem to make a difference. In top, postgresql generally sits in the 'sbwait' state. I'm assuming this means it's waiting for a blocking socket. I have tried sending more inserts per query, but this does not seem to make a difference. Is this a bug? Is there a better way to handle inserts of this volume? Thanks, Lucas Madar