X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D307C9DCB34 for ; Wed, 25 Jan 2006 08:44:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 70189-02 for ; Wed, 25 Jan 2006 08:44:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 6AA069DCAD3 for ; Wed, 25 Jan 2006 08:44:43 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id AB21E4095A5; Wed, 25 Jan 2006 12:44:37 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 9978515EE9; Wed, 25 Jan 2006 12:44:45 +0000 (GMT) Message-ID: <43D772BD.8080809@archonet.com> Date: Wed, 25 Jan 2006 12:44:45 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Evgeny Gridasov Cc: pgsql-performance@postgresql.org Subject: Re: DB responce during DB dump References: <20060125150134.55589806.eugrid@fpm.kubsu.ru> In-Reply-To: <20060125150134.55589806.eugrid@fpm.kubsu.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.093 required=5 tests=[AWL=0.093] X-Spam-Score: 0.093 X-Spam-Level: X-Archive-Number: 200601/430 X-Sequence-Number: 16908 Evgeny Gridasov wrote: > Hi, everybody! > > I experience problems with backing up one of my Postgresql 8.1.2 installations. > The problem is that when I do DB backup, all queries begin to run very slow =( > The database only grows in its size (~20Gb today), and the number of transactions increases every month. > A year ago such slow down was OK, but today it is unacceptable. > > I found out that pg_dump dramatically increases hdd I/O and because of this most of all > queries begin to run slower. My application using this DB server is time-critical, so > any kind of slow down is critical. > > I've written a perl script to limit pg_dump output bandwidth, a simple traffic shaper, > which runs as: pg_dumpall -c -U postgres | limit_bandwidth.pl | bzip2 > pgsql_dump.bz2 > The limit_bandwidth.pl script limits pipe output at 4Mb/sec rate, which seems to be ok. > > Is there any other solution to avoid this problem? That's an interesting solution, and I'd guess people might like to see it posted to the list if it's not too big. Also, there's no reason you have to dump from the same machine, you can do so over the network which should reduce activity a little bit. Basically though, it sounds like you either need more disk I/O or a different approach. Have you looked into using PITR log-shipping or replication (e.g. slony) to have an off-machine backup? -- Richard Huxton Archonet Ltd