pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Hardware performance for large updates
Date: Thu, 05 Sep 2002 21:33:16 -0700
Message-ID: <3D78300C.7030403@joeconway.com> (raw)
References: <web-1635430@davinci.ethosmedia.com>

Josh Berkus wrote:
> The problem: The update series (done as a function) takes 10-15
> minutes.  During this time, the CPU is never more than 31% busy, only
> 256mb of 512 is in use, and the disk channel is only 25% - 50%
> saturated.    As such, is seems like we could run things faster.
> 
> What does everybody suggest tweaking?
> 

I think we'd need more information to be of any help -- schema, 
functions, explain output, etc.

I do think you probably could increase Shared Buffers, as 256 is pretty 
small. There's been a lot of debate over the best setting. The usual 
guidance is start at 25% of physical RAM (16384 == 128MB if you have 
512MB RAM), then tweak to optimize performance for your application and 
hardware. You might also bump sort mem up a bit (maybe to 2048). Again, 
I would test using my app and hardware to get the best value. Are you on 
a Linux server -- if so I found that fdatasync works better than (the 
default) fsync for wal_sync_method.

HTH,

Joe




view thread (4+ messages)  latest in thread

Message-ID: <3D78300C.7030403@joeconway.com>
Permalink:  ../3D78300C.7030403@joeconway.com/
Also on:    postgresql.org/message-id/3D78300C.7030403@joeconway.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mail@joeconway.com, josh@agliodbs.com
  Subject: Re: Hardware performance for large updates
  In-Reply-To: <3D78300C.7030403@joeconway.com>

* 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