pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Adam (IMS) Vaughn <VaughnA@imsweb.com>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Cc: Scott (IMS) Depuy <DepuyS@imsweb.com>
Cc: Kevin (IMS) Meagher <MeagherK@imsweb.com>
Subject: Re: long running commits
Date: Fri, 25 Feb 2011 16:45:04 -0600
Message-ID: <4D67DC90020000250003B04B@gw.wicourts.gov> (raw)
In-Reply-To: <6B760A41CEE02F46BADF29B4A874D6010F11C13A63@FALCON.omni.imsweb.com>
References: <6B760A41CEE02F46BADF29B4A874D6010F11C13A63@FALCON.omni.imsweb.com>

"Vaughn, Adam (IMS)" <VaughnA@imsweb.com> wrote:
 
> In the past 2 days we have been experiencing problems on our
> production server with very long running commit statements which
> seem to cause the entire instance to become blocked and
> non-responsive. These are the log messages for the 2 commit
> statements (these occurred inside of a 1 hour block)
> 
> duration: 945599.193 ms  execute S_2: COMMIT
> duration: 967507.896 ms  execute S_2: COMMIT
> 
> Can anyone provide some assistance in how we should diagnose this
> problem (tools) and some possible solutions for solving it?
 
Look for prior posts by Greg Smith on this topic.  (Or better yet,
buy his book.)  I don't believe anyone has a better handle on this
issue than he does.
 
That said, if you want emergency relief before you hear from him,
and a safer place from which to start tuning toward your optimal
settings based on the process he describes, I would make these
changes:
 
> bgwriter_delay                  100
> bgwriter_lru_maxpages         100
> bgwriter_lru_multiplier         2.2
 
> shared_buffers                6GB
 
bgwriter_delay                  200
bgwriter_lru_maxpages         1000
bgwriter_lru_multiplier         4
 
shared_buffers                512MB
 
These settings may not give you quite the same performance between
lockups, but the lockups should be less frequent and severe, and may
disappear entirely.  You may not want to stay here, but it's
probably a relatively safe place from which to start the process of
incremental adjustments to find your best settings.
 
The overall idea of these settings is to push more of the writes
toward the disk soon enough to prevent a debilitating glut at fsync
time.  We're getting better at dealing with this in each release, so
you may want to consider moving forward from 8.3 to help with it,
too.
 
-Kevin



view thread (7+ messages)  latest in thread

Message-ID: <4D67DC90020000250003B04B@gw.wicourts.gov>
Permalink:  ../4D67DC90020000250003B04B@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D67DC90020000250003B04B@gw.wicourts.gov

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, VaughnA@imsweb.com, DepuyS@imsweb.com, MeagherK@imsweb.com
  Subject: Re: long running commits
  In-Reply-To: <4D67DC90020000250003B04B@gw.wicourts.gov>
  References: <6B760A41CEE02F46BADF29B4A874D6010F11C13A63@FALCON.omni.imsweb.com> <4D67DC90020000250003B04B@gw.wicourts.gov>

* 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