pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pierre C <lists@peufeu.com>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: Dave Crooke <dcrooke@gmail.com>
Cc: Paul McGarry <paul@paulmcgarry.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: shared_buffers advice
Date: Tue, 16 Mar 2010 14:53:38 +0000
Message-ID: <407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com> (raw)
In-Reply-To: <8285.1268749832@sss.pgh.pa.us>
References: <a056b1d41003101728h2bfe964cg43bf5ef1aabae14d@mail.gmail.com>
	<ca24673e1003152217q117b0fd3q7d2d75ff20185c8b@mail.gmail.com>
	<4B9F3302.4020900@2ndquadrant.com>
	<op.u9nrbeeteorkce@localhost>
	<8285.1268749832@sss.pgh.pa.us>

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



view thread (51+ messages)  latest in thread

Message-ID: <407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com>
Permalink:  ../407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com/
Also on:    postgresql.org/message-id/407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.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-performance@postgresql.org
  Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, lists@peufeu.com, greg@2ndquadrant.com, dcrooke@gmail.com, paul@paulmcgarry.com
  Subject: Re: shared_buffers advice
  In-Reply-To: <407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.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