From: Andres Freund <andres@anarazel.de>
To: Greg Stark <gsstark@mit.edu>
Cc: pgsql-hackers@postgresql.org, Greg Smith <greg@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Michael Clemmons <glassresistor@gmail.com>
Cc: Hannu Krosing <hannu@2ndquadrant.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Subject: Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Date: Tue, 29 Dec 2009 12:13:21 +0100
Message-ID: <200912291213.21721.andres@anarazel.de> (raw)
In-Reply-To: <407d949e0912290248y24acd059q1f31d6f0d057bbe6@mail.gmail.com>
References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com>
<200912290305.39932.andres@anarazel.de>
<407d949e0912290248y24acd059q1f31d6f0d057bbe6@mail.gmail.com>
On Tuesday 29 December 2009 11:48:10 Greg Stark wrote:
> On Tue, Dec 29, 2009 at 2:05 AM, Andres Freund <andres@anarazel.de> wrote:
> > Reads Completed: 2, 8KiB Writes Completed: 2362,
> > 29672KiB New:
> > Reads Completed: 0, 0KiB Writes Completed: 550,
> > 5960KiB
>
> It looks like the new method is only doing 1/6th as much i/o. Do you
> know what's going on there?
While I was surprised by the amount of difference I am not surprised at all
that there is a significant one - currently the fsync will write out a whole
bunch of useless stuff every time its called (all metadata, directory structure
and so on)
This is reproducible...
6MB sounds sensible for the operation btw - the template database is around
5MB.
Will try to analyze later what exactly causes the additional io.
Andres
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-hackers@postgresql.org
Cc: andres@anarazel.de, gsstark@mit.edu, greg@2ndquadrant.com, tgl@sss.pgh.pa.us, glassresistor@gmail.com, hannu@2ndquadrant.com, scott.marlowe@gmail.com
Subject: Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
In-Reply-To: <200912291213.21721.andres@anarazel.de>
* 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