Re: sorted writes for checkpoints

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sorted writes for checkpoints
Date: 2010-11-08 00:13:52
Message-ID: 4CD740C0.4000802@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Janes wrote:

> Assuming the ordering is useful, the only way the OS can do as good a
> job as the checkpoint code can, is if the OS stores the entire
> checkpoint worth of data as dirty blocks and doesn't start writing
> until an fsync comes in. This strikes me as a pathologically
> configured OS/FS. (And would explain problems with fsyncs)
>

This can be exactly the situation with ext3 on Linux, which I believe is
one reason the write sorting patch didn't go anywhere last time it came
up--that's certainly what I tested it on. The slides for my talk
"Righting Your Writes" are now up at
http://projects.2ndquadrant.com/talks and an example showing this is on
page 9. I'm hoping to get the 3 patches shown in action or described in
that talk submitted to the list before the next CommitFest. You really
need timing of individual sync calls to figure out what's going on here,
and what happens is completely dependent on filesystem.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shigeru HANADA 2010-11-08 00:36:20 Re: SQL/MED estimated time of arrival?
Previous Message Andrew Dunstan 2010-11-07 23:46:53 Re: Buildfarm client version 4.3 released