Re: shared_buffers advice

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pierre C <lists(at)peufeu(dot)com>, Greg Smith <greg(at)2ndquadrant(dot)com>, Dave Crooke <dcrooke(at)gmail(dot)com>, Paul McGarry <paul(at)paulmcgarry(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: shared_buffers advice
Date: 2010-03-16 21:30:54
Message-ID: 20100316213054.GG3037@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greg Stark escribió:
> On Tue, Mar 16, 2010 at 2:30 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > "Pierre C" <lists(at)peufeu(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-03-16 21:39:26 Re: shared_buffers advice
Previous Message Greg Smith 2010-03-16 20:53:24 Re: shared_buffers advice