Re: 8.4.1 ubuntu karmic slow createdb

From: Michael Clemmons <glassresistor(at)gmail(dot)com>
To: Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-performance(at)postgresql(dot)org, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re: 8.4.1 ubuntu karmic slow createdb
Date: 2009-12-12 20:36:27
Message-ID: 4427a97a0912121236g4c06c562u221d638810ed2b6e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

If ppl think its worth it I'll create a ticket

On Sat, Dec 12, 2009 at 6:09 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com>wrote:

> On Sat, 2009-12-12 at 01:19 +0100, Andres Freund wrote:
> > Hi,
> >
> > On Saturday 12 December 2009 00:59:13 Scott Marlowe wrote:
> > > On Fri, Dec 11, 2009 at 3:52 PM, Michael Clemmons
> > > > Createdb takes
> > > > 12secs on my system(9.10 pg8.4 and ext4) which is impossibly slow
> for
> > > > running 200unittests.
> > > > Fsync got it to .2secs or so which is blazing but
> > > > also the speed I expected being used to 8.3 and xfs. This dev box is
> my
> > > > laptop and the data is litterally unimportant and doesn't exist
> longer
> > > > than 20sec but Im all about good practices. Will definately try
> > > > synchronous commit tonight once Im done working for the day. I've
> got
> > > > some massive copying todo later though so this will probably help in
> the
> > > > future as well.
> > > Yeah, I'd probably resort to fsync off in that circumstance too
> > > especially if syn commit off didn't help that much.
> >
> > How should syn commit help with creating databases?
>
> It does not help here. Tested ;)
>
> > The problem with 8.4 and creating databases is that the number of files
> > increased hugely because of the introduction of relation forks.
>
> Plus the fact that fsync on ext4 is really slow. some info here:
>
> http://ldn.linuxfoundation.org/article/filesystems-data-preservation-fsync-and-benchmarks-pt-3
>
> > It probably wouldnt be that hard to copy all files first, then reopen and
> fsync
> > them. Actually that should be a patch doable in an hour or two.
>
> Probably something worth doing, as it will speed this up on all
> filesystems, and doubly so on ext4 and xfs.
>
> --
> Hannu Krosing http://www.2ndQuadrant.com
> PostgreSQL Scalability and Availability
> Services, Consulting and Training
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2009-12-12 20:38:41 Re: 8.4.1 ubuntu karmic slow createdb
Previous Message Stephen Frost 2009-12-12 20:30:03 Row-Level Security

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2009-12-12 20:38:41 Re: 8.4.1 ubuntu karmic slow createdb
Previous Message Andres Freund 2009-12-12 00:19:38 Re: 8.4.1 ubuntu karmic slow createdb