Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 874C4632CF3 for ; Fri, 11 Dec 2009 20:19:57 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 51749-01 for ; Sat, 12 Dec 2009 00:19:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id 42E0462E33C for ; Fri, 11 Dec 2009 20:19:46 -0400 (AST) Received: from alap2.localnet (e178236122.adsl.alicedsl.de [85.178.236.122]) by mail.anarazel.de (Postfix) with ESMTPSA id 0153644800A; Sat, 12 Dec 2009 01:19:42 +0100 (CET) From: Andres Freund To: pgsql-performance@postgresql.org Subject: Re: 8.4.1 ubuntu karmic slow createdb Date: Sat, 12 Dec 2009 01:19:38 +0100 User-Agent: KMail/1.13.0 (Linux/2.6.32-andres-00908-g6ec22f9; KDE/4.3.80; x86_64; ; ) Cc: Scott Marlowe , Michael Clemmons References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <4427a97a0912111452m35552852ub7c3fe30f8191849@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912120119.39272.andres@anarazel.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.405 tagged_above=-10 required=5 tests=AWL=0.194, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/163 X-Sequence-Number: 36777 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? The problem with 8.4 and creating databases is that the number of files increased hugely because of the introduction of relation forks. 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. Andres