pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Claudio Freire <klaussfreire@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Blocking excessively in FOR UPDATE
Date: Fri, 04 Nov 2011 11:26:57 -0500
Message-ID: <4EB3CC010200002500042A53@gw.wicourts.gov> (raw)
In-Reply-To: <CAGTBQpa__c1djJ6FE0k03944tBOkyz7OvAZU3Z6JagEB=PmbjA@mail.gmail.com>
References: <CAGTBQpY7zd9h+xv4Gvh0+-G1UgiWg1zd7zUsXPDFvQoGa4JScA@mail.gmail.com>
	<6734.1320345936@sss.pgh.pa.us>
	<CAGTBQpY+O4m9Tyqo=6En7+r-1qdMws5O_rk9MbEo-HRxAJsyMw@mail.gmail.com>
	<CAGTBQpYK6-ycWr0WXRwz39Bv30sCbDe68CC3MbhUp9-jwu_V=g@mail.gmail.com>
	<19908.1320363946@sss.pgh.pa.us>
	<CAGTBQpa__c1djJ6FE0k03944tBOkyz7OvAZU3Z6JagEB=PmbjA@mail.gmail.com>

Claudio Freire <klaussfreire@gmail.com> wrote:
 
> Now, I'm thinking those writes are catching the DB at a bad moment
-
> we do have regular very write-intensive peaks.
> 
> Maybe I should look into increasing shared buffers?
 
As already pointed out, SELECT FOR UPDATE will require a disk write
of the tuple(s) read.  If these are glutting, increasing
shared_buffers would tend to make things worse.  You might want to
make the background writer more aggressive or *reduce*
shared_buffers to better spread the output.
 
Hopefully you have a BBU RAID controller configured for write-back. 
If not you should.  If you do, another thing which might help is
increasing the cache on that controller.  Or you could move WAL to a
separate file system on a separate controller with its own BBU
write-back cache.
 
-Kevin



view thread (18+ messages)  latest in thread

Message-ID: <4EB3CC010200002500042A53@gw.wicourts.gov>
Permalink:  ../4EB3CC010200002500042A53@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4EB3CC010200002500042A53@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-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, klaussfreire@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Blocking excessively in FOR UPDATE
  In-Reply-To: <4EB3CC010200002500042A53@gw.wicourts.gov>
  References: <CAGTBQpY7zd9h+xv4Gvh0+-G1UgiWg1zd7zUsXPDFvQoGa4JScA@mail.gmail.com> <6734.1320345936@sss.pgh.pa.us> <CAGTBQpY+O4m9Tyqo=6En7+r-1qdMws5O_rk9MbEo-HRxAJsyMw@mail.gmail.com> <CAGTBQpYK6-ycWr0WXRwz39Bv30sCbDe68CC3MbhUp9-jwu_V=g@mail.gmail.com> <19908.1320363946@sss.pgh.pa.us> <CAGTBQpa__c1djJ6FE0k03944tBOkyz7OvAZU3Z6JagEB=PmbjA@mail.gmail.com> <4EB3CC010200002500042A53@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