From: Todd A. Cook <tcook@blackducksoftware.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ruairi <rcarroll@bluemetrix.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Restore of pg_dump taking a long time...
Date: Wed, 24 May 2006 15:42:25 -0400
Message-ID: <4474B721.8040101@blackducksoftware.com> (raw)
In-Reply-To: <468.1148496451@sss.pgh.pa.us>
References: <008c01c67f26$9848caf0$2815a8c0@D5T7W62J>
<468.1148496451@sss.pgh.pa.us>
Tom Lane wrote:
>
> There's not much you can do to improve the performance of a restore
> already in progress. Next time you might want to think about kicking up
> maintenance_work_mem before you start it; that's about the only thing
> you can really do to speed up index builds.
I have found that increasing maintenance_work_mem can decrease index
build speed on large tables:
maintenance_work_mem 32768 262144 1048576 2097151
---------------------------------------------------------------
index 400M rows (min) 55 61 68 70
index 45M rows (min) 4.03 4.22 4.88 2.55
These timings were done on a machine with 8GB ram and postgresql 8.1.3
(from the RPMs on postgresql.org). Each time is an average of three
runs; before each run, postgres was shut down and the filesystem with
/var/lib/pgsql was remounted to clear the filesystem cache.
I'm assuming that the times are increasing because there is less
memory available for the filesystem cache. Similarly, I assume that
the runs on the smaller table with maintenance_work_mem = 2097151
are faster because everything fits in that space.
-- todd
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-admin@postgresql.org
Cc: tcook@blackducksoftware.com, tgl@sss.pgh.pa.us, rcarroll@bluemetrix.com
Subject: Re: Restore of pg_dump taking a long time...
In-Reply-To: <4474B721.8040101@blackducksoftware.com>
References: <008c01c67f26$9848caf0$2815a8c0@D5T7W62J> <468.1148496451@sss.pgh.pa.us> <4474B721.8040101@blackducksoftware.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