Skip site navigation (1) Skip section navigation (2)

Re: Using multiple cores for index creation?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: henk de wit <henk53602(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Using multiple cores for index creation?
Date: 2009-01-29 23:09:53
Message-ID: 603c8f070901291509r4cae86aes843dfaf127ffb2c5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Thu, Jan 29, 2009 at 3:21 PM, henk de wit <henk53602(at)hotmail(dot)com> wrote:
> Hi,
> When I try to restore a database dump on PostgreSQL 8.3
> that's approximately 130GB in size and takes about 1 hour, I noticed index
> creation makes up the bulk of that time. I'm using a very fast I/O subsystem
> (16 Mtron Pro 7535 SSDs using a dual 1.2Ghz IOP/4GB cache RAID controller),
> fast CPUs (2 quad core C2Q's at 2.6Ghz) and 32GB RAM. From monitoring the
> restore process, I learned that only 10 minutes is spend doing IO, while the
> rest of the time is spend on creating the indexes. Index creation seems to
> be completely CPU bound.
> The problem is that only 1 CPU core is used. My other 7 cores are just
> sitting there doing nothing. It seems to me that creating each index,
> especially for different tables, is something that can be done
> independently.
> Is there some way I can let PostgreSQL use multiple cores for creating the
> indexes?

Andrew Dunstan has been working on this problem.  His latest parallel
restore patch can be found here:

http://archives.postgresql.org/message-id/4977E070.6070604@dunslane.net

...Robert

In response to

Responses

pgsql-performance by date

Next:From: Joshua D. DrakeDate: 2009-01-29 23:19:42
Subject: Re: Using multiple cores for index creation?
Previous:From: Chris BrowneDate: 2009-01-29 20:56:47
Subject: Re: PG performance in high volume environment (many INSERTs and lots of aggregation reporting)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group