Throttling backups¶
xtrabackup does not block database activity during a backup, but xtrabackup generates additional disk input/output (I/O) activity. On systems with limited I/O capacity, this can affect database performance.
Use the --throttle option to limit the backup rate.
How throttling works¶
Use the --throttle option to minimize backup impact on system performance. By limiting the number of 10 MB chunks processed per second, you effectively limit both data throughput and I/O operations per second (IOPS)
When used with the --backup option, --throttle limits the number of read–write operation pairs per second. For incremental backups, the limit applies only to read operations.
For example:
--throttle=1limits processing to approximately 10 MB/s--throttle=10limits processing to approximately 100 MB/s
By default, throttling is disabled, and xtrabackup runs at the maximum rate permitted by the system.
When to use throttling¶
Use the --throttle option in the following scenarios:
-
High-traffic production systems
On latency-sensitive workloads, unthrottled backups can cause I/O contention. This may increase query latency as the database waits for disk operations to complete. -
Limited storage throughput (cloud environments)
On platforms such as AWS with provisioned IOPS or burst limits (for example, EBS volumes), unthrottled backups can exceed available I/O capacity. This may degrade overall system performance when limits are reached. -
Systems with slower storage
On HDDs or lower-performance SSDs, higher latency and seek times limit the number of concurrent I/O operations. Throttling prevents backups from saturating the storage subsystem. -
Multi-tenant or co-located environments
When multiple services share the same host, unthrottled backups can consume available I/O bandwidth and affect other applications.
Configuration guidelines¶
Select a throttle value based on available I/O capacity and workload requirements.
Typical starting points:
- Busy systems:
--throttle=1–5 - Moderate load:
--throttle=5–20 - Dedicated backup window: no throttling
Note
If the throttle value is too low, the backup may not keep up with the rate of transaction log generation and may not complete.
Adjust the value based on observed system performance.
Example usage¶
Full backup with throttling¶
Limit the backup speed to approximately 10 MB/s:
xtrabackup --backup --target-dir=/backups/full --throttle=1
Expected output
xtrabackup: Starting backup
xtrabackup: Throttling set to 1 chunks per second
...
xtrabackup: Transaction log of lsn (12345678) to (12345999) was copied.
xtrabackup: completed OK!
Moderate throttling¶
Limit the backup to approximately 100 MB/s:
xtrabackup --backup --target-dir=/backups/full --throttle=10
Expected output
xtrabackup: Starting backup
xtrabackup: Throttling set to 10 chunks per second
...
xtrabackup: completed OK!
Incremental backup with throttling¶
For incremental backups, the limit applies only to read operations.
xtrabackup \
--backup \
--target-dir=/backups/inc1 \
--incremental-basedir=/backups/full \
--throttle=5
Expected output
xtrabackup: Starting incremental backup
xtrabackup: Throttling set to 5 chunks per second
...
xtrabackup: completed OK!