Re: PG Logging is Slow - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: PG Logging is Slow
Date
Msg-id 200412200431.iBK4VOd03148@candle.pha.pa.us
Whole thread Raw
In response to PG Logging is Slow  (Theo Galanakis <Theo.Galanakis@lonelyplanet.com.au>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Theo Galanakis
Date:
Subject: PG Logging is Slow
Next
From: Grega Bremec
Date:
Subject: Re: PG Logging is Slow