X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E570A52888 for ; Fri, 5 Aug 2005 16:49:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32910-05 for ; Fri, 5 Aug 2005 19:49:24 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 3070E52840 for ; Fri, 5 Aug 2005 16:49:22 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 05 Aug 2005 14:49:22 -0500 Subject: Re: tweak config file to increase pg_dump speed on pg 8.02 From: Scott Marlowe To: D Kavan Cc: pgsql-admin@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1123271362.15481.329.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 05 Aug 2005 14:49:22 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200508/65 X-Sequence-Number: 18384 On Fri, 2005-08-05 at 14:28, D Kavan wrote: > Hi, > > It's taken 4 hours so far to dump a 3.5 GB database on a local disk. > How can I increase performance? > > We have the work memory & effective cach size are set to 16 MB. Our > maintenance_work_memory is set to 256 MB. Thanks for any help. > For the record we are running with dual 64-bit chips with 8 GB of memory. I > have noticed that the only 6.5 % of the memory is being used for this and > the load is only at just over 1. Sounds like your machine is I/O starved. What's your CPU utilization? What's your shared_buffers set to? (not that it'll usually help a lot in a backup usually, but if there's a lot of other access going on it might) How much memory is the KERNEL using as cache? PostgreSQL doesn't really use a lot of memory by the way, relying on the kernel to cache for it. You might wanna crank up effective_cache_size. That setting doesn't allocate anything, it tells the planner about how much memory your OS is using to cache the postgresql dataset. on a dedicated pgsql server with 8 gig ram, I'd expect it to be equal to about 7.5gig/8192. Are you dumping to the same drive your database is on? Often dumping to another drive helps a lot too.