Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4ECA764FC2D for ; Fri, 26 Sep 2008 20:09:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23952-03 for ; Fri, 26 Sep 2008 20:09:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gatekeeper.Mib-infotech.co.nz (60-234-154-229.bitstream.orcon.net.nz [60.234.154.229]) by postgresql.org (Postfix) with ESMTP id A6E4264FC01 for ; Fri, 26 Sep 2008 20:09:41 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by gatekeeper.Mib-infotech.co.nz (Postfix) with ESMTP id D776510C6F5; Sat, 27 Sep 2008 11:09:36 +1200 (NZST) X-Virus-Scanned: amavisd-new at mib-infotech.co.nz Received: from gatekeeper.Mib-infotech.co.nz ([127.0.0.1]) by localhost (gatekeeper.mib-infotech.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rGGL2InCZE85; Sat, 27 Sep 2008 11:09:31 +1200 (NZST) Received: from [192.168.95.202] (mr-creosote.mib-infotech.co.nz [192.168.95.202]) by gatekeeper.Mib-infotech.co.nz (Postfix) with ESMTPA id 76DB810C6EE; Sat, 27 Sep 2008 11:09:31 +1200 (NZST) Message-ID: <48DD6BAB.8040302@mib-infotech.co.nz> Date: Sat, 27 Sep 2008 11:09:31 +1200 From: John Huttley User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Greg Smith CC: pgsql-performance@postgresql.org Subject: Re: Slow updates, poor IO References: <48DBE587.3050406@mib-infotech.co.nz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.715 tagged_above=0 required=5 tests=RCVD_IN_SORBS_DUL=1.615, RDNS_DYNAMIC=0.1 X-Spam-Level: * X-Archive-Number: 200809/237 X-Sequence-Number: 31550 Hi Greg, I've got 32M shared on a 1G machine and 16 checkpoint segments. I'll run some tests against 64 segments and see what happens. Your previous postings were extremely helpful wrt the MVCC issue. I thank you! -john Greg Smith wrote: > On Fri, 26 Sep 2008, John Huttley wrote: > >> running update file set perms='0664' took about 10 mins > > What do you have checkpoint_segments and shared_buffers set to? If > you want something that's doing lots of updates to perform well, you > need to let PostgreSQL have a decent size chunk of memory to buffer > the index writes with, so it's more likely they'll get combined into > larger and therefore more easily sorted blocks rather than as more > random ones. The randomness of the writes is why your write rate is > so slow. You also need to cut down on the frequency of checkpoints > which are very costly on this type of statement. > > Also: which version of PostgreSQL? 8.3 includes an improvement aimed > at updates like this you might benefit from. > > -- > * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD >