pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vivek Khera <khera@kcilink.com>
To: pgsql-performance@postgresql.org
Subject: restore time: sort_mem vs. checkpoing_segments
Date: Mon, 15 Sep 2003 15:15:46 -0400
Message-ID: <16230.4066.565194.387700@yertle.int.kciLink.com> (raw)

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.



view thread (10+ messages)  latest in thread

Message-ID: <16230.4066.565194.387700@yertle.int.kciLink.com>
Permalink:  ../16230.4066.565194.387700@yertle.int.kciLink.com/
Also on:    postgresql.org/message-id/16230.4066.565194.387700@yertle.int.kciLink.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: khera@kcilink.com
  Subject: Re: restore time: sort_mem vs. checkpoing_segments
  In-Reply-To: <16230.4066.565194.387700@yertle.int.kciLink.com>
  References: <16230.4066.565194.387700@yertle.int.kciLink.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox