Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, Greg Smith <greg(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org, Michael Clemmons <glassresistor(at)gmail(dot)com>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Date: 2009-12-29 11:13:21
Message-ID: 200912291213.21721.andres@anarazel.de (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
On Tuesday 29 December 2009 11:48:10 Greg Stark wrote:
> On Tue, Dec 29, 2009 at 2:05 AM, Andres Freund <andres(at)anarazel(dot)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

In response to

pgsql-performance by date

Next:From: Andres FreundDate: 2009-12-29 18:30:49
Subject: Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Previous:From: Greg StarkDate: 2009-12-29 10:48:10
Subject: Re: [HACKERS] Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2009-12-29 11:42:30
Subject: Re: Port for Microsoft Services for Unix (SFU) or SUA
Previous:From: Magnus HaganderDate: 2009-12-29 11:02:21
Subject: Re: Can we hide data from the superadmin

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group