Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bv2gO-0002zX-Qy for pgsql-performance@arkaria.postgresql.org; Fri, 14 Oct 2016 13:37:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bv2gO-0006Ri-C3 for pgsql-performance@arkaria.postgresql.org; Fri, 14 Oct 2016 13:37:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bv2gM-0006NN-SO for pgsql-performance@postgresql.org; Fri, 14 Oct 2016 13:37:55 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bv2gK-00051p-C6 for pgsql-performance@postgresql.org; Fri, 14 Oct 2016 13:37:53 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BE9595F7B0; Fri, 14 Oct 2016 09:37:51 -0400 (EDT) Date: Fri, 14 Oct 2016 09:37:51 -0400 From: Stephen Frost To: Swapnil Vaze Cc: pgsql-performance@postgresql.org Subject: Re: pg_basebackup running slow Message-ID: <20161014133751.GA13284@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oZv4yqUxWy6Z3hn+" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 09:34:23 up 97 days, 14:58, 20 users, load average: 0.07, 0.07, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --oZv4yqUxWy6Z3hn+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Vaze, * Swapnil Vaze (swapvaze28@gmail.com) wrote: > We are using postgresql 9.2 on redhat linux instance over openstack cloud. >=20 > Database is around 441 GB. >=20 > We are using below command to take backup: >=20 > pg_basebackup -v -D /pgbackup/$bkupdir -Ft -z -c fast >=20 > Backup size created is around 84GB. >=20 > However, it is taking almost 10 hr 21 minutes to complete. >=20 > 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 --oZv4yqUxWy6Z3hn+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYAN+vAAoJEO1sijiDR2RVVqoP/1otkGR2HRw4QcJZd2tRY5ZQ JlRQaDxJZQSMeW02jGO5EfebJl0F8UPs5LsQHcaf0ROnb5BcnY58PuwMFV1KmaSo AKKm4SgVbIrJM/j/U5ASfNM63fxLAdThBQ5IrgBHfVa3vEfATpsHzlW4rkZ2ZWzs 3l5Os+TZgxygzCTt+xHZiYWuTpKdyzp7TLAta9D5ySiTRnrWz2R08mxqutVk0rNA yfGvqLru4TTIKv4uAFlMYDDwJHKp92dG8qE0tQPu0EruoGS3WDrOc3iWrrDDa7K4 punzXz0EsqhG69zhfZZ0w/YN1CbCKpZS4r1lS9Nu9DXGPHro3sf07+2CEQaJobhb 063XoDtptNkCYuIhNEetDljAjcbUdNyymVgi+KuZKQviKG0Pa24HAQp84htcWQGx cS2YH/tdxaT6XWjK+GIP2b2eROkzo4z6CmFQo55VV4ll2FRm7WngAHrnndUOdoVE QOlCaIfdMoY2hR1bT/w00fub8MHFXSysUSUiMs8uH3OE4wKh/sA6XzRZvY8eWqAN f4kJyacUdUhDXke/MGhwo0gtXVKJ5L4oQeR1adVRw1UtnyIlAkcXRy3zXP2uX9Qt qxtUvjIRTu2hADnFSVcOj/6kcnZTzq53hMlwQvAmDPBMF90PA44bWsN2rsF2YDB6 Dqpl264wpX6Pf3eREDOE =WWaA -----END PGP SIGNATURE----- --oZv4yqUxWy6Z3hn+--