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 ED63AD1B8A8 for ; Tue, 23 Sep 2003 13:59:18 +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 01979-01 for ; Tue, 23 Sep 2003 10:59:09 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 31951D1B580 for ; Tue, 23 Sep 2003 10:59:03 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h8NDx1A01317; Tue, 23 Sep 2003 09:59:01 -0400 (EDT) From: Bruce Momjian Message-Id: <200309231359.h8NDx1A01317@candle.pha.pa.us> Subject: Re: restore time: sort_mem vs. checkpoing_segments In-Reply-To: <16230.4066.565194.387700@yertle.int.kciLink.com> To: Vivek Khera Date: Tue, 23 Sep 2003 09:59:01 -0400 (EDT) Cc: pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/293 X-Sequence-Number: 3659 Vivek Khera wrote: > 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 With the new warning about too-frequent checkpoints, people have actual feedback to encourage them to increase checkpoint_segments. One issue is that it is likely to recommend increasing checkpoint_segments during restore, even if there is no value to it being large during normal server operation. Should that be decumented? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073