Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 057932E016C for ; Wed, 26 Dec 2007 16:52:20 -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 56347-02 for ; Wed, 26 Dec 2007 16:52:14 -0400 (AST) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by postgresql.org (Postfix) with ESMTP id 342522E0191 for ; Wed, 26 Dec 2007 16:52:14 -0400 (AST) Received: by fk-out-0910.google.com with SMTP id b27so3324726fka.3 for ; Wed, 26 Dec 2007 12:52:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=OxGcVQxwds8rEbL0xda+ZzPccTYX0nj71ILhWG9Ig6g=; b=Ay8cJMH3tUJTIl97tJsGa5VZm9hYJbyud011eXeF5lCR8yl5tcnnKR6yeuWe5e+fg5WWtKr5D0ImExh5stZkCdF0UCulPg/Mmd+jEfUt6ubFGywfH1zhVkdFAN2+/oN72ZRyQZ4KM/UR71DIek4HSHQHz9btn3XV8ob3NN9yxm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=UNSQ+UuKUYp/nDoiL0r5PGkJujkqTedZjqVG0Lgz41UZ80cEIA3XtlqCcu4UTmL+6MHn4wlf1Ry2rxW7MbGmEE65lHan4bRwZ2FBXXv1jwGv1K+yXqL+SdQuVtVHQ/cdF84fzze/vf+yByoakiyvmTzaGMUQFbGWtyZxzbDKVGo= Received: by 10.78.185.15 with SMTP id i15mr8680899huf.15.1198702332115; Wed, 26 Dec 2007 12:52:12 -0800 (PST) Received: from ?192.168.0.199? ( [80.222.48.97]) by mx.google.com with ESMTPS id 1sm10272588nfv.3.2007.12.26.12.52.09 (version=SSLv3 cipher=RC4-MD5); Wed, 26 Dec 2007 12:52:11 -0800 (PST) Message-ID: <4772BEF8.2030509@enterprisedb.com> Date: Wed, 26 Dec 2007 22:52:08 +0200 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.14pre (X11/20071020) MIME-Version: 1.0 To: Jared Mauch CC: pgsql-performance@postgresql.org Subject: Re: pg_dump performance References: <20071226202230.GA76524@puck.nether.net> In-Reply-To: <20071226202230.GA76524@puck.nether.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/371 X-Sequence-Number: 28187 Jared Mauch wrote: > 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). > ... > 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). I would suggest running oprofile to see where the time is spent. There might be some simple optimizations that you could do at the source level that would help. Where the time is spent depends a lot on the schema and data. For example, I profiled a pg_dump run on a benchmark database a while ago, and found that most of the time was spent in sprintf, formatting timestamp columns. If you have a lot of timestamp columns that might be the bottleneck for you as well, or something else. Or if you can post the schema for the table you're dumping, maybe we can make a more educated guess. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com