Skip site navigation (1) Skip section navigation (2)

Re: PG Logging is Slow

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Theo Galanakis <Theo(dot)Galanakis(at)lonelyplanet(dot)com(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PG Logging is Slow
Date: 2004-12-20 04:31:24
Message-ID: 200412200431.iBK4VOd03148@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-performance by date

Next:From: Alexander KirpaDate: 2004-12-20 04:45:11
Subject: Re: Processor optimization compile options?
Previous:From: Theo GalanakisDate: 2004-12-20 04:17:11
Subject: PG Logging is Slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group