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 3CA1F3A1A72 for ; Mon, 20 Dec 2004 04:31:27 +0000 (GMT) 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 84607-03 for ; Mon, 20 Dec 2004 04:31:23 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 7A02F3A1AE7 for ; Mon, 20 Dec 2004 04:31:21 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id iBK4VOd03148; Sun, 19 Dec 2004 23:31:24 -0500 (EST) From: Bruce Momjian Message-Id: <200412200431.iBK4VOd03148@candle.pha.pa.us> Subject: Re: PG Logging is Slow In-Reply-To: <16C0CF355FA04944A69E5A4F5299D30B110EAA@ganesh.au.lpint.net> To: Theo Galanakis Date: Sun, 19 Dec 2004 23:31:24 -0500 (EST) Cc: pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/242 X-Sequence-Number: 9617 Theo Galanakis wrote: > Under postgres 7.3 logging is incredibly slow! > > I have applied the following settings: > > syslog = 2 > syslog_facility = 'LOCAL0' > syslog_ident = 'postgres' > > log_connections = true > log_duration = true > log_pid = true > log_statement = true > log_timestamp = true > > This severely impacted the performance of our production system, a search > page which took 1-3 seconds now takes over 30, is this normal? > > I need to get some performance indicators from our production db, however I > cant turn on logging with such performance degradation. Linux syslog has this bad behavior of fsync'ing all log writes. See the syslog manual page for a way to turn off the fsync. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073