X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B6BA9D1B537 for ; Tue, 9 Sep 2003 13:34:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 96808-09 for ; Tue, 9 Sep 2003 10:33:41 -0300 (ADT) Received: from ns1.bee.lt (ns.bi.lt [213.226.131.131]) by svr1.postgresql.org (Postfix) with ESMTP id 742ADD1B54A for ; Tue, 9 Sep 2003 10:33:36 -0300 (ADT) Received: from B027543 (inet.bee.lt [213.226.131.30]) by ns1.bee.lt (8.11.6/8.11.6) with SMTP id h89DXdi19816 for ; Tue, 9 Sep 2003 16:33:40 +0300 Message-ID: <00dc01c376d6$f9f99c30$f20214ac@bite.lt> From: "Mindaugas Riauba" To: References: <00be01c376cf$91510620$f20214ac@bite.lt> <200309091414.23458.dev@archonet.com> Subject: Re: Need advice about triggers Date: Tue, 9 Sep 2003 16:33:32 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1257" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/149 X-Sequence-Number: 3515 > > How can I improve performance and will version 7.4 bring something > > valuable for my task? Rewrite to some other scripting language is not > > a problem. Trigger is simple enough. > > Well, try it without the trigger. If performance improves markedly, it might > be worth rewriting in C. Nope. Execution time is practically the same without trigger. > If not, you're probably saturating the disk I/O - using iostat/vmstat will let > you see what's happening. If it is your disks, you might see if moving the > WAL onto a separate drive would help, or check the archives for plenty of > discussion about raid setups. Bottleneck in this case is CPU. postmaster process uses almost 100% of CPU. > > Postgres v7.3.4, shared_buffers=4096 max_fsm settings also bumped up > > 10 times. > Well effective_cache_size is useful for reads, but won't help with writing. > You might want to look at wal_buffers and see if increasing that helps, but I > couldn't say for sure. Disk I/O should not be a problem in this case. vmstat shows ~300kb/s write activity. Mindaugas