Re: PostgreSQL Dump rate is too slow

From: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
To: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL Dump rate is too slow
Date: 2015-01-08 13:45:29
Message-ID: 20150108134529.GE3783@aart.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jan 08, 2015 at 11:05:54AM +0530, girish R G peetle wrote:
> Hi all,
> We have a customer who has 1TB database on a production server. They are
> trying dump based backup of this large database. Following dump command is
> being used.
> Dump rate is around 12 GB/hr, which will take lot of time for the backup to
> complete. This is affecting their production server.
> Is there is a way to increase dump data rate ?
>
> pg_dump -U <User> -Fc -b --port=<Port> '<Db-Name>'
>
>
> PostgreSQL version : 9.2.4
> Platform : Linux
>
> Thanks
> Girish

Hi Girish,

The custom format is compressed by default and your dump rate is hamstrung by
the slow compression algorithm being used. I our case for a smaller DB, turning
off compression completely (-Z 0) dropped our time to dump the DB from 6 hours
to about 20 minutes. You can push the uncompressed dump through a faster compression
engine using lzo, snappy or lz4 if you need to have compressed output due to space
limitations.

Regards,
Ken

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2015-01-08 13:45:45 Re: PostgreSQL Dump rate is too slow
Previous Message Robert Burgholzer 2015-01-08 11:14:12 Re: PostgreSQL Dump rate is too slow