Re: Slow updates, poor IO

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: John Huttley <John(at)mib-infotech(dot)co(dot)nz>
Cc: pgsql-performance(at)postgresql(dot)org, Dan Langille <dan(at)langille(dot)org>
Subject: Re: Slow updates, poor IO
Date: 2008-09-25 21:57:35
Message-ID: Pine.GSO.4.64.0809251750130.16879@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, 26 Sep 2008, John Huttley wrote:

> running update file set perms='0664' took about 10 mins

What do you have checkpoint_segments and shared_buffers set to? If you
want something that's doing lots of updates to perform well, you need to
let PostgreSQL have a decent size chunk of memory to buffer the index
writes with, so it's more likely they'll get combined into larger and
therefore more easily sorted blocks rather than as more random ones. The
randomness of the writes is why your write rate is so slow. You also need
to cut down on the frequency of checkpoints which are very costly on this
type of statement.

Also: which version of PostgreSQL? 8.3 includes an improvement aimed at
updates like this you might benefit from.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2008-09-26 06:43:25 Re: CPU load
Previous Message Scott Marlowe 2008-09-25 20:00:11 Re: CPU load