Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 37D03650129 for ; Tue, 8 Jul 2008 12:22:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66747-05 for ; Tue, 8 Jul 2008 12:22:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by postgresql.org (Postfix) with ESMTP id 0BCFA6500B8 for ; Tue, 8 Jul 2008 12:22:00 -0300 (ADT) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id m68FLwgJ062897; Tue, 8 Jul 2008 18:21:58 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id m68FLwLv062896; Tue, 8 Jul 2008 18:21:58 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: Tom Lane Subject: Re: syslog performance when logging big statements Date: Tue, 8 Jul 2008 18:21:57 +0300 User-Agent: KMail/1.9.7 Cc: pgsql-performance@postgresql.org References: <200807081524.47366.achill@matrix.gatewaynet.com> <8675.1215527716@sss.pgh.pa.us> In-Reply-To: <8675.1215527716@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807081821.57935.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/70 X-Sequence-Number: 30670 =CE=A3=CF=84=CE=B9=CF=82 Tuesday 08 July 2008 17:35:16 =CE=BF/=CE=B7 Tom La= ne =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Achilleas Mantzios writes: > > In this case, the INSERT *needs* 20 minutes to return. This is because = the logging through syslog seems to severely slow the system. > > If instead, i use stderr, even with logging_collector=3Don, the same st= atement needs 15 seconds to return. >=20 > Hmm. There's a function in elog.c that breaks log messages into chunks > for syslog. I don't think anyone's ever looked hard at its performance > --- maybe there's an O(N^2) behavior? >=20 > regards, tom lane >=20 Thanx, i changed PG_SYSLOG_LIMIT in elog.c:1269 from 128 to 1048576 #ifndef PG_SYSLOG_LIMIT /* #define PG_SYSLOG_LIMIT 128 */ #define PG_SYSLOG_LIMIT 1048576 #endif and i got super fast stderr performance. :) However, i noticed a certain amount of data in the log is lost. Didnt dig much to the details tho. =2D-=20 Achilleas Mantzios