Dear Team,I’ve run a script by cronjob with Xtrabackup to backup MySQL on the server, but the websites on the server down or load a long time when it runs.
The options I’m used to backup in the script:
“–user=”–password=“–backup”“–extra-lsndir=”–compress"“–encrypt=AES256"”–encrypt-key-file=“–parallel=${processors}”“–encrypt-threads=${processors}”
Please let me know the solution can solve this problem.
Thanks and regard.
if you use
--parallel=${processors}
then you allocate all your CPUs to the XtraBackup, and that of course makes your database starving for CPU resources.
you can start with --parallel=1 and gradually increase until it does affect your website performance.
In general the good idea is to take backups from replicas to avoid the overload of the primary server.
vadimtk said: if you use ``` --parallel=${processors} ```Thanks for your support in this case, now I've edited with --parallel=1 and will monitor again.
then you allocate all your CPUs to the XtraBackup, and that of course makes your database starving for CPU resources.
you can start with --parallel=1 and gradually increase until it does affect your website performance.
In general the good idea is to take backups from replicas to avoid the overload of the primary server.