Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C32CE1337B81 for ; Fri, 18 Mar 2011 11:38:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 26388-02-5 for ; Fri, 18 Mar 2011 14:38:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 26ED51337C1B for ; Fri, 18 Mar 2011 11:38:15 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 18 Mar 2011 09:38:15 -0500 Message-Id: <4D8327FD020000250003BA92@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 18 Mar 2011 09:38:05 -0500 From: "Kevin Grittner" To: "Michael Andreasen" , "Andy Colson" Cc: Subject: Re: Fastest pq_restore? References: <4D82B075.7070202@squeakycode.net> In-Reply-To: <4D82B075.7070202@squeakycode.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/218 X-Sequence-Number: 42897 Andy Colson wrote: > On 03/17/2011 09:25 AM, Michael Andreasen wrote: >> I've been looking around for information on doing a pg_restore as >> fast as possible. >> I am using a twin processor box with 2GB of memory >> shared_buffers = 496MB Probably about right. >> maintenance_work_mem = 160MB You might get a benefit from a bit more there; hard to say what's best with so little RAM. >> checkpoint_segments = 30 This one is hard to call without testing. Oddly, some machines do better with the default of 3. Nobody knows why. >> autovacuum = false >> full_page_writes=false Good. > fsync = off > synchronous_commit = off Absolutely. > bgwriter_lru_maxpages = 0 I hadn't thought much about that last one -- do you have benchmarks to confirm that it helped with a bulk load? You might want to set max_connections to something lower to free up more RAM for caching, especially considering that you have so little RAM. -Kevin