From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dylan Luong <Dylan.Luong@unisa.edu.au>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Performance issues during backup
Date: Tue, 20 Feb 2018 09:02:28 +0100
Message-ID: <1519113748.2482.2.camel@cybertec.at> (raw)
In-Reply-To: <7cf3e053324e4946a8468f4a5989fc3b@ITUPW-EXMBOX3B.UniNet.unisa.edu.au>
References: <7cf3e053324e4946a8468f4a5989fc3b@ITUPW-EXMBOX3B.UniNet.unisa.edu.au>
Dylan Luong wrote:
> We perform nighty base backup of our production PostgreSQL instance. We have a script that basically puts the instance
> into back mode and then backs up (tar) the /Data directory and then takes it out of backup mode.
> Ie,
> psql -c "SELECT pg_start_backup('${DATE}');"
> tar -cvf - ${DATA_DIR} --exclude ${DATA_DIR}/pg_log | split -d -b $TAR_SPLIT_SIZE - ${BACKUP_DIR}/${BACKUP_NAME}
> psql -c "SELECT pg_stop_backup();"
>
> The size of our database is about 250GB and it usually takes about 1 hour to backup.
> During this time, we have performance issue where queries can take up to 15secs to return where normally it takes 2 to 3 seconds.
> During this time (1:30am) usage is low (less than 10 users) on the system.
>
> Has anyone experience the same problem and any suggestions where to look at to resolve the problem?
The "tar" is probably taking up too much I/O bandwidth.
Assuming this is Linux, you could run it with
ionice -c 2 -n 7 tar ...
or
ionice -c 3 tar ...
Of course then you can expect the backup to take more time.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, Dylan.Luong@unisa.edu.au
Subject: Re: Performance issues during backup
In-Reply-To: <1519113748.2482.2.camel@cybertec.at>
References: <7cf3e053324e4946a8468f4a5989fc3b@ITUPW-EXMBOX3B.UniNet.unisa.edu.au> <1519113748.2482.2.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox