Re: syslog performance when logging big statements

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: syslog performance when logging big statements
Date: 2008-07-08 15:21:57
Message-ID: 200807081821.57935.achill@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Στις Tuesday 08 July 2008 17:35:16 ο/η Tom Lane έγραψε:
> Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2008-07-08 16:38:39 Re: Fusion-io ioDrive
Previous Message Tom Lane 2008-07-08 14:35:16 Re: syslog performance when logging big statements