Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 0014F2E0045 for ; Fri, 2 May 2008 17:28:51 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 51134-03 for ; Fri, 2 May 2008 17:28:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.227]) by developer.postgresql.org (Postfix) with ESMTP id CD0FE2E003E for ; Fri, 2 May 2008 17:28:47 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 76so1179150wra.10 for ; Fri, 02 May 2008 13:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=RV3mAtLYa49sA6nos0kwR22YE0EcDQBFYnCw57A4E+4=; b=WbYqpIOEZyjKJNswvMaFn/PbRusYpZvgenh3WNHnOH3d5rMMf+19Z9HBqaRV7WelLOi7SwGhY6k7dtKEC7SQAtpMd8ufB7XvJoRByAKDdiby8LCUqjUPSiUIvAo8kJOFTfo2f3gl7OBXUgmdSeeS/Uaox2mLMwNTnajn0dhez9w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=w3ZNeDq2wK05nNXOyrz8SRfKmIGbezn7Z7iduK/8TyilLErj+5PQa8eahuDZkLIkCH692Jjo2Bt8zG6WRzJ40WI0SxJ296TKZxwuClnSQume+Jg7WRi9Px2G7gtrM9YEikMbvUndxc6VbWJ0cHDBUaQMdFZ3tVwyteU8Tbx2FRs= Received: by 10.140.127.20 with SMTP id z20mr1532253rvc.77.1209760125918; Fri, 02 May 2008 13:28:45 -0700 (PDT) Received: from ?192.168.1.100? ( [24.19.22.42]) by mx.google.com with ESMTPS id f21sm4772514rvb.0.2008.05.02.13.28.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 02 May 2008 13:28:44 -0700 (PDT) Cc: pgsql-performance@postgresql.org Message-Id: From: Alexy Khrabrov To: Greg Smith In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: two memory-consuming postgres processes Date: Fri, 2 May 2008 13:28:42 -0700 References: X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.015 tagged_above=0 required=5 tests=AWL=0.015 X-Spam-Level: X-Archive-Number: 200805/26 X-Sequence-Number: 29994 On May 2, 2008, at 1:22 PM, Greg Smith wrote: > On Fri, 2 May 2008, Alexy Khrabrov wrote: > >> I have an UPDATE query updating a 100 million row table, and >> allocate enough memory via shared_buffers=1500MB. > > In addition to reducing that as you've been advised, you'll probably > need to increase checkpoint_segments significantly from the default > (3) in order to get good performance on an update that large. > Something like 30 would be a reasonable starting point. > > I'd suggest doing those two things, seeing how things go, and > reporting back if you still think performance is unacceptable. We'd > need to know your PostgreSQL version in order to really target > future suggestions. PostgreSQL 8.3.1, compiled from source on Mac OSX 10.5.2 (Leopard). Saw the checkpoint_segments warning every ~20sec and increased it to 100 already. Will see what 512 MB buys me, but 128 MB was paging miserably. Cheers, Alexy