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 900BF5383F for ; Fri, 13 May 2005 11:12:43 -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 44765-07 for ; Fri, 13 May 2005 14:12:41 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6812453771 for ; Fri, 13 May 2005 11:12:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j4DECfjv023518; Fri, 13 May 2005 10:12:42 -0400 (EDT) To: "Mindaugas Riauba" Cc: pgsql-performance@postgresql.org Subject: Re: PostgreSQL strugling during high load In-reply-to: <022901c557c5$73df1220$f20214ac@bite.lt> References: <01cc01c557ba$a4fdb0b0$f20214ac@bite.lt> <23217.1115991763@sss.pgh.pa.us> <022901c557c5$73df1220$f20214ac@bite.lt> Comments: In-reply-to "Mindaugas Riauba" message dated "Fri, 13 May 2005 17:10:01 +0300" Date: Fri, 13 May 2005 10:12:41 -0400 Message-ID: <23517.1115993561@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/260 X-Sequence-Number: 12424 "Mindaugas Riauba" writes: > It looks like that not only vacuum causes our problems. vacuum_cost > seems to lower vacuum impact but we are still noticing slow queries "storm". > We are logging queries that takes >2000ms to process. > And there is quiet periods and then suddenly 30+ slow queries appears in > log within the same second. What else could cause such behaviour? Checkpoints? You should ensure that the checkpoint settings are such that checkpoints don't happen too often (certainly not oftener than every five minutes or so), and make sure the bgwriter is configured to dribble out dirty pages at a reasonable rate, so that the next checkpoint doesn't have a whole load of stuff to write. regards, tom lane