Re: What exactly is postgres doing during INSERT/UPDATE ? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: What exactly is postgres doing during INSERT/UPDATE ?
Date
Msg-id dcc563d10908280129i2e4277b4r7abd9a982aeaae5b@mail.gmail.com
Whole thread Raw
In response to Re: What exactly is postgres doing during INSERT/UPDATE ?  (Greg Smith <gsmith@gregsmith.com>)
Responses Re: What exactly is postgres doing during INSERT/UPDATE ?  (Joseph S <jks@selectacast.net>)
List pgsql-performance
On Fri, Aug 28, 2009 at 2:08 AM, Greg Smith<gsmith@gregsmith.com> wrote:
>
> This sort of workload involves random I/O rather than sequential.  On
> regular hard drives this normally happens at a tiny fraction of the speed
> because of how the disk has to seek around.  Typically a single drive
> capable of 50-100MB/s on sequential I/O will only do 1-2MB/s on a completely
> random workload.  You look like you're getting somewhere in the middle
> there, on the low side which doesn't surprise me.
>
> The main two things you can do to improve this on the database side:
>
> -Increase checkpoint_segments, which reduces how often updated data has to
> be flushed to disk
>
> -Increase shared_buffers in order to hold more of the working set of data in
> RAM, so that more reads are satisfied by the database cache and less data
> gets evicted to disk.

After that you have to start looking at hardware.  Soimething as
simple as a different drive for indexes and another for WAL, and
another for the base tables can make a big difference.

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: What exactly is postgres doing during INSERT/UPDATE ?
Next
From: Joseph S
Date:
Subject: Re: What exactly is postgres doing during INSERT/UPDATE ?