Re: Blocking excessively in FOR UPDATE - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Blocking excessively in FOR UPDATE
Date
Msg-id 4EB3CC010200002500042A53@gw.wicourts.gov
Whole thread Raw
In response to Re: Blocking excessively in FOR UPDATE  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: Blocking excessively in FOR UPDATE  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Sorbara, Giorgio (CIOK)"
Date:
Subject: Re: Strange query plan
Next
From: Claudio Freire
Date:
Subject: Re: Blocking excessively in FOR UPDATE