Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C701C2E02FA for ; Thu, 27 Dec 2007 09:15:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 15787-03 for ; Thu, 27 Dec 2007 09:15:10 -0400 (AST) Received: from oxford.xeocode.com (76-10-150-5.dsl.teksavvy.com [76.10.150.5]) by postgresql.org (Postfix) with ESMTP id BC79F2E0196 for ; Thu, 27 Dec 2007 09:15:15 -0400 (AST) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1J7sZC-0002Mo-UL; Thu, 27 Dec 2007 13:14:31 +0000 To: "Jared Mauch" Cc: Subject: Re: pg_dump performance In-Reply-To: <20071226202230.GA76524@puck.nether.net> (Jared Mauch's message of "Wed\, 26 Dec 2007 15\:22\:30 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.performance" 3764) References: <20071226202230.GA76524@puck.nether.net> From: Gregory Stark Organization: EnterpriseDB Date: Thu, 27 Dec 2007 13:14:25 +0000 Message-ID: <871w98xosu.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/405 X-Sequence-Number: 28221 "Jared Mauch" writes: > 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). >... > 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 Fwiw those are pretty unusual numbers. Normally work_mem is much smaller than shared_buffers since you only need one block of memory for shared buffers and work_mem is for every query (and every sort within those queries). If you have ten queries running two sorts each this setting of work_mem could consume 5GB. Raising shared buffers could improve your pg_dump speed. If all the data is in cache it would reduce the time spend moving data between filesystem cache and postgres shared buffers. What made you raise wal_buffers so high? I don't think it hurts but that's a few orders of magnitude higher than what I would expect to help. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!