Re: pg_basebackup running slow

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Swapnil Vaze <swapvaze28(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: pg_basebackup running slow
Date: 2016-10-14 13:37:51
Message-ID: 20161014133751.GA13284@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Vaze,

* Swapnil Vaze (swapvaze28(at)gmail(dot)com) wrote:
> We are using postgresql 9.2 on redhat linux instance over openstack cloud.
>
> Database is around 441 GB.
>
> We are using below command to take backup:
>
> pg_basebackup -v -D /pgbackup/$bkupdir -Ft -z -c fast
>
> Backup size created is around 84GB.
>
> However, it is taking almost 10 hr 21 minutes to complete.
>
> Looking for speed improvement?

pg_basebackup is single-threaded and the compression is pretty
CPU-intensive. You could try reducing the compression level, but that
will make the backups larger, of course. Also, there's a limit to how
far that will get you- once you get to "no compression", that's just as
fast as pg_basebackup can run.

If you're interested in a backup tool which can operate in parallel, you
might want to look at pgbackrest.

Thanks!

Stephen

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kyle Moser 2016-10-14 17:27:04 Hibernate generated query slow compared to 'equivalent' hand written one
Previous Message Michael Paquier 2016-10-14 13:37:11 Re: pg_basebackup running slow