Re: shared_buffers advice - Mailing list pgsql-performance

From Greg Stark
Subject Re: shared_buffers advice
Date
Msg-id 407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com
Whole thread Raw
In response to Re: shared_buffers advice  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: shared_buffers advice  (Greg Smith <greg@2ndquadrant.com>)
Re: shared_buffers advice  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-performance
On Tue, Mar 16, 2010 at 2:30 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Pierre C" <lists@peufeu.com> writes:
>> Does PG issue checkpoint writes in "sorted" order ?
>
> No.  IIRC, a patch for that was submitted, and rejected because no
> significant performance improvement could be demonstrated.  We don't
> have enough information about the actual on-disk layout to be very
> intelligent about this, so it's better to just issue the writes and
> let the OS sort them.

Keep in mind that postgres is issuing writes to the OS buffer cache.
It defers fsyncing the files as late as it can in the hopes that most
of those buffers will be written out by the OS before then. That gives
the OS a long time window in which to flush them out in whatever order
and whatever schedule is most convenient.

If the OS filesystem buffer cache is really small then that might not
work so well. It might be worth rerunning those benchmarks on a
machine with shared buffers taking up all of RAM.


--
greg

pgsql-performance by date:

Previous
From: Greg Stark
Date:
Subject: Re: shared_buffers advice
Next
From: Meena_Ramkumar
Date:
Subject: Postgres DB maintainenance - vacuum and reindex