pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Smet <guillaume.smet@gmail.com>
To: Frank Joerdens <frank@joerdens.de>
Cc: pgsql-performance@postgresql.org, Nic Ferrier <nic@woome.com>
Cc: Avleen Vig <avleen@woome.com>
Cc: Mike Rogers <mike.rogers@woome.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: Full statement logging problematic on larger machines?
Date: Thu, 12 Mar 2009 00:59:06 +0100
Message-ID: <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com> (raw)
In-Reply-To: <7d10d2df0903111227g2e40e742g5992cba5158dd4d2@mail.gmail.com>
References: <7d10d2df0903111227g2e40e742g5992cba5158dd4d2@mail.gmail.com>

On Wed, Mar 11, 2009 at 8:27 PM, Frank Joerdens <frank@joerdens.de> wrote:
> This works much better but once we are at about 80% of peak load -
> which is around 8000 transactions per second currently - the server goes
> into a tailspin in the manner described above and we have to switch off full
> logging.

First, don't use log_duration = on + log_statement = 'all' to log all
the queries, use log_min_duration_statement=0, it's less verbose.

I don't know if the logging integrated into PostgreSQL can bufferize
its output. Andrew? If not, you should try syslog instead and see if
asynchronous logging with syslog is helping (you need to prefix the
path with a dash to enable asynchronous logging). You can also try to
send the logs on the network via udp (and also tcp if you have an
enhanced syslog-like).

Another option is to log the duration of every query but not the text.
We used to have this sort of configuration to gather comprehensive
statistics and slowest queries on highly loaded servers (it's not
perfect though but it can be an acceptable compromise):
log_duration = on
log_min_duration_statement = 100

-- 
Guillaume



view thread (16+ messages)  latest in thread

Message-ID: <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com>
Permalink:  ../1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.com/
Also on:    postgresql.org/message-id/1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.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: guillaume.smet@gmail.com, frank@joerdens.de, nic@woome.com, avleen@woome.com, mike.rogers@woome.com, andrew@dunslane.net
  Subject: Re: Full statement logging problematic on larger machines?
  In-Reply-To: <1d4e0c10903111659x6c96e6cau33ee121ee29a48a@mail.gmail.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