X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9A494D1B501 for ; Mon, 15 Sep 2003 19:16:33 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 32501-05 for ; Mon, 15 Sep 2003 16:16:02 -0300 (ADT) Received: from yertle.kcilink.com (yertle.kcilink.com [216.194.193.105]) by svr1.postgresql.org (Postfix) with ESMTP id 9C7F4D1B4F1 for ; Mon, 15 Sep 2003 16:16:00 -0300 (ADT) Received: by yertle.kcilink.com (Postfix, from userid 100) id B71522178C; Mon, 15 Sep 2003 15:15:46 -0400 (EDT) From: Vivek Khera MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16230.4066.565194.387700@yertle.int.kciLink.com> Date: Mon, 15 Sep 2003 15:15:46 -0400 To: pgsql-performance@postgresql.org Subject: restore time: sort_mem vs. checkpoing_segments X-Mailer: VM 7.14 under 21.4 (patch 12) "Portable Code" XEmacs Lucid X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/216 X-Sequence-Number: 3582 And the winner is... checkpoint_segments. Restore of a significanly big database (~19.8GB restored) shows nearly no time difference depending on sort_mem when checkpoint_segments is large. There are quite a number of tables and indexes. The restore was done from a pg_dump -Fc dump of one database. All tests with 16KB page size, 30k shared buffers, sort_mem=8192, PG 7.4b2 on FreeBSD 4.8. 3 checkpoint_segments restore time: 14983 seconds 50 checkpoint_segments restore time: 11537 seconds 50 checkpoint_segments, sort_mem 131702 restore time: 11262 seconds There's an initdb between each test. For reference, the restore with 8k page size, 60k buffers, 8192 sort_mem and 3 checkpoint buffers was 14777 seconds. It seems for restore that a larger number of checkpoint buffers is the key, especially when dealing with large numbers of rows in a table. I notice during the restore that the disk throughput triples during the checkpoint. The postgres data partition is on a 14-spindle hardware RAID5 on U320 SCSI disks.