From: Alvaro Herrera <alvherre@commandprompt.com>
To: Greg Stark <gsstark@mit.edu>
Cc: 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 18:30:54 -0300
Message-ID: <20100316213054.GG3037@alvh.no-ip.org> (raw)
In-Reply-To: <407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com>
References: <a056b1d41003101728h2bfe964cg43bf5ef1aabae14d@mail.gmail.com>
<ca24673e1003152217q117b0fd3q7d2d75ff20185c8b@mail.gmail.com>
<4B9F3302.4020900@2ndquadrant.com>
<op.u9nrbeeteorkce@localhost>
<8285.1268749832@sss.pgh.pa.us>
<407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com>
Greg Stark escribió:
> 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.
Maybe it would make more sense to try to reorder the fsync calls
instead.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: alvherre@commandprompt.com, 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: <20100316213054.GG3037@alvh.no-ip.org>
References: <a056b1d41003101728h2bfe964cg43bf5ef1aabae14d@mail.gmail.com> <ca24673e1003152217q117b0fd3q7d2d75ff20185c8b@mail.gmail.com> <4B9F3302.4020900@2ndquadrant.com> <op.u9nrbeeteorkce@localhost> <8285.1268749832@sss.pgh.pa.us> <407d949e1003160753o6e5faa48rabaa42f7548029b7@mail.gmail.com> <20100316213054.GG3037@alvh.no-ip.org>
* 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