Re: Blocking excessively in FOR UPDATE

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Claudio Freire" <klaussfreire(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "postgres performance list" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Blocking excessively in FOR UPDATE
Date: 2011-11-04 16:26:57
Message-ID: 4EB3CC010200002500042A53@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Claudio Freire <klaussfreire(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2011-11-04 16:48:51 Re: Blocking excessively in FOR UPDATE
Previous Message Sorbara, Giorgio (CIOK) 2011-11-04 16:14:48 Re: Strange query plan