Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2DC422E00E6 for ; Fri, 22 Feb 2008 06:40:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18370-01 for ; Fri, 22 Feb 2008 06:40:45 -0400 (AST) Received: from mail.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) by postgresql.org (Postfix) with ESMTP id 32F0B2E00C4 for ; Fri, 22 Feb 2008 06:40:45 -0400 (AST) Received: from localhost (mail2.mnc.ch [127.0.0.1]) by mail.mnc.ch (Postfix) with ESMTP id 5359323079 for ; Fri, 22 Feb 2008 10:40:43 +0000 (GMT) X-Virus-Scanned: amavisd-new at mnc.ch Received: from mail.mnc.ch ([127.0.0.1]) by localhost (mail2.mnc.ch [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id VQg9vOR0QL0V for ; Fri, 22 Feb 2008 10:40:42 +0000 (GMT) Received: from meuh.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by mail.mnc.ch (Postfix) with ESMTP id F18D023073 for ; Fri, 22 Feb 2008 10:40:42 +0000 (GMT) Received: by meuh.localdomain (Postfix, from userid 1000) id D41371837A2; Fri, 22 Feb 2008 11:40:42 +0100 (CET) To: pgsql-performance@postgresql.org Subject: Re: 7 hrs for a pg_restore? References: <200802191303.58840.doug@hunley.homeip.net> <47BB1C51.6010203@archonet.com> <19241.1203445378@sss.pgh.pa.us> <87ablu5icl.fsf@mnc.ch> <13059.1203617372@sss.pgh.pa.us> From: Guillaume Cottenceau X-Hashcash: 1:20:080222:pgsql-performance@postgresql.org::h1cHYl/TyDwNG8Hp:000000000000000000000000000001ACb Date: Fri, 22 Feb 2008 11:40:42 +0100 In-Reply-To: <13059.1203617372@sss.pgh.pa.us> (Tom Lane's message of "Thu\, 21 Feb 2008 13\:09\:32 -0500") Message-ID: <874pc146l1.fsf@mnc.ch> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/283 X-Sequence-Number: 28825 Tom Lane writes: > Guillaume Cottenceau writes: >> I have made a comparison restoring a production dump with default >> and large maintenance_work_mem. The speedup improvement here is >> only of 5% (12'30 => 11'50). > >> Apprently, on the restored database, data is 1337 MB[1] and >> indexes 644 MB[2][2]. Pg is 8.2.3, checkpoint_segments 3, >> maintenance_work_mem default (16MB) then 512MB, shared_buffers >> 384MB. It is rather slow disks (Dell's LSI Logic RAID1), hdparm >> reports 82 MB/sec for reads. > > The main thing that jumps out at me is that boosting checkpoint_segments > would probably help. I tend to set it to 30 or so (note that this > corresponds to about 1GB taken up by pg_xlog). Interestingly, from a bzipped dump, there is no win; however, from an uncompressed dump, increasing checkpoint_segments from 3 to 30 decreases clock time from 9'50 to 8'30 (15% if I'm correct). -- Guillaume Cottenceau