pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: syslog performance when logging big statements
Date: Tue, 8 Jul 2008 18:21:57 +0300
Message-ID: <200807081821.57935.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <8675.1215527716@sss.pgh.pa.us>
References: <200807081524.47366.achill@matrix.gatewaynet.com>
	<8675.1215527716@sss.pgh.pa.us>

Στις Tuesday 08 July 2008 17:35:16 ο/η Tom Lane έγραψε:
> Achilleas Mantzios <achill@matrix.gatewaynet.com> 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=on, the same statement needs 15 seconds to return.
> 
> 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?
> 
> 			regards, tom lane
> 

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.

-- 
Achilleas Mantzios



view thread (12+ messages)  latest in thread

Message-ID: <200807081821.57935.achill@matrix.gatewaynet.com>
Permalink:  ../200807081821.57935.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/200807081821.57935.achill@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: achill@matrix.gatewaynet.com, tgl@sss.pgh.pa.us
  Subject: Re: syslog performance when logging big statements
  In-Reply-To: <200807081821.57935.achill@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox