Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0144162E33C for ; Fri, 11 Dec 2009 18:05:12 -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 29421-02 for ; Fri, 11 Dec 2009 22:04:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og112.obsmtp.com (exprod7og112.obsmtp.com [64.18.2.177]) by mail.postgresql.org (Postfix) with SMTP id 8215B6329AA for ; Fri, 11 Dec 2009 18:05:00 -0400 (AST) Received: from source ([209.85.219.227]) by exprod7ob112.postini.com ([64.18.6.12]) with SMTP ID DSNKSyLCCgM6xJXgF6YOEeEar+QsqmYP/0lG@postini.com; Fri, 11 Dec 2009 14:05:00 PST Received: by ewy27 with SMTP id 27so1743535ewy.36 for ; Fri, 11 Dec 2009 14:04:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.89.138 with SMTP id c10mr812610wef.47.1260568783936; Fri, 11 Dec 2009 13:59:43 -0800 (PST) In-Reply-To: References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <200912102256.59868.andres@anarazel.de> <4427a97a0912101401kb29e1a5ic5424d6d0b7efe62@mail.gmail.com> <200912102309.04057.andres@anarazel.de> <1260554319.2611.10.camel@jd-desktop.unknown.charter.com> <1260564610.2611.41.camel@jd-desktop.unknown.charter.com> Date: Fri, 11 Dec 2009 16:59:43 -0500 Message-ID: Subject: Re: 8.4.1 ubuntu karmic slow createdb From: Scott Mead To: Nikolas Everett Cc: jd , Andres Freund , pgsql-performance , Michael Clemmons Content-Type: multipart/alternative; boundary=0016e6db2dbb94dc7e047a7b0afc X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200912/156 X-Sequence-Number: 36770 --0016e6db2dbb94dc7e047a7b0afc Content-Type: text/plain; charset=ISO-8859-1 On Fri, Dec 11, 2009 at 4:39 PM, Nikolas Everett wrote: > > > > Fair enough. I'm of the opinion that developers need to have their unit > tests run fast. If they aren't fast then your just not going to test as > much as you should. If your unit tests *have* to createdb then you have to > do whatever you have to do to get it fast. It'd probably be better if unit > tests don't create databases or alter tables at all though. > > Regardless of what is going on on your dev box you really should leave > fsync on on your continuous integration, integration test, and QA machines. > They're what your really modeling your production on anyway. > The other common issue is that developers running with something like 'fsync=off' means that they have completely unrealistic expectations of the performance surrounding something. If your developers see that when fsync is on, createdb takes x seconds vs. when it's off, then they'll know that basing their entire process on that probably isn't a good idea. When developers think something is lightning, they tend to base lots of stuff on it, whether it's production ready or not. --Scott --0016e6db2dbb94dc7e047a7b0afc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Fri, Dec 11, 2009 at 4:39 PM, Nikolas Everett= <nik9000@gmail.c= om> wrote:



Fair enough.=A0 I'm of the = opinion that developers need to have their unit tests run fast.=A0 If they = aren't fast then your just not going to test as much as you should.=A0 = If your unit tests *have* to createdb then you have to do whatever you have= to do to get it fast.=A0 It'd probably be better if unit tests don'= ;t create databases or alter tables at all though.

Regardless of what is going on on your dev box you really should leave = fsync on on your continuous integration, integration test, and QA machines.= =A0 They're what your really modeling your production on anyway.


=A0 The other common issue is that de= velopers running with something like 'fsync=3Doff' means that they = have completely unrealistic expectations of the performance surrounding som= ething.=A0 If your developers see that when fsync is on, createdb takes x s= econds vs. when it's off, then they'll know that basing their entir= e process on that probably isn't a good idea.=A0 When developers think = something is lightning, they tend to base lots of stuff on it, whether it&#= 39;s production ready or not. =A0

=A0
--Scott

--0016e6db2dbb94dc7e047a7b0afc--