Re: Hardware performance for large updates - Mailing list pgsql-sql

From Joe Conway
Subject Re: Hardware performance for large updates
Date
Msg-id 3D78300C.7030403@joeconway.com
Whole thread Raw
In response to Hardware performance for large updates  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Hardware performance for large updates  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Hardware performance for large updates
Next
From: "Josh Berkus"
Date:
Subject: Re: Hardware performance for large updates