Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3431B2E3173 for ; Wed, 26 Dec 2007 16:24:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 48279-06-2 for ; Wed, 26 Dec 2007 16:24:00 -0400 (AST) Received: from puck.nether.net (puck.nether.net [204.42.254.5]) by postgresql.org (Postfix) with ESMTP id B4B8F2E2F54 for ; Wed, 26 Dec 2007 16:22:31 -0400 (AST) Received: from puck.nether.net (puck.nether.net [204.42.254.5]) by puck.nether.net (8.14.1/8.12.9) with ESMTP id lBQKMU9w078931 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 26 Dec 2007 15:22:30 -0500 (EST) (envelope-from jared@puck.nether.net) Received: (from jared@localhost) by puck.nether.net (8.14.1/8.12.9/Submit) id lBQKMUIr078930 for pgsql-performance@postgresql.org; Wed, 26 Dec 2007 15:22:30 -0500 (EST) (envelope-from jared) Date: Wed, 26 Dec 2007 15:22:30 -0500 From: Jared Mauch To: pgsql-performance@postgresql.org Subject: pg_dump performance Message-ID: <20071226202230.GA76524@puck.nether.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-4.0 (puck.nether.net [204.42.254.5]); Wed, 26 Dec 2007 15:22:30 -0500 (EST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/369 X-Sequence-Number: 28185 I've been looking at the performance of pg_dump in the past week off and on trying to see if I can get it to work a bit faster and was looking for tips on this. doing a pg_dump on my 34311239 row table (1h of data btw) results in a wallclock time of 187.9 seconds or ~182k rows/sec. I've got my insert (COPY) performance around 100k/sec and was hoping to get the reads to be much faster. The analysis I'm doing is much faster doing a pg_dump than utilizing a few queries for numerous reasons. (If you care, I can enumerate them to you privately but the result is pg_dump is the best way to handle the multiple bits of analysis that are needed, please trust me). What i'm seeing: pg_dump is utilizing about 13% of the cpu and the corresponding postgres backend is at 100% cpu time. (multi-core, multi-cpu, lotsa ram, super-fast disk). I'm not seeing myself being I/O bound so was interested if there was a way I could tweak the backend performance or offload some of the activity to another process. pg8.3(beta) with the following variances from default checkpoint_segments = 300 # in logfile segments, min 1, 16MB each effective_cache_size = 512MB # typically 8KB each wal_buffers = 128MB # min 4, 8KB each shared_buffers = 128MB # min 16, at least max_connections*2, 8KB each work_mem = 512MB # min 64, size in KB unrelated but associated data, the table has one index on it. not relevant for pg_dump but i'm interested in getting better concurent index creation (utilize those cpus better but not slow down my row/sec perf) but that's another topic entirely.. Any tips on getting pg_dump (actually the backend) to perform much closer to 500k/sec or more? This would also aide me when I upgrade pg versions and need to dump/restore with minimal downtime (as the data never stops coming.. whee). Thanks! - Jared -- Jared Mauch | pgp key available via finger from jared@puck.nether.net clue++; | http://puck.nether.net/~jared/ My statements are only mine.