mysql xtrabackup工具等待优化

https://www.percona.com/doc/percona-xtrabackup/LATEST/xtrabackup_bin/flush-tables-with-read-lock.html

xtrabckup工具的备份优化,添加了下面的参数
Options summary
–ftwrl-wait-timeout (seconds) - how long to wait for a good moment. Default is 0, not to wait.
–ftwrl-wait-query-type - which long queries should be finished before FLUSH TABLES WITH READ LOCK is run. Default is all.
–ftwrl-wait-threshold (seconds) - how long query should be running before we consider it long running and potential blocker of global lock.
–kill-long-queries-timeout (seconds) - how many time we give for queries to complete after FLUSH TABLES WITH READ LOCK is issued before start to kill. Default if 0, not to kill.
–kill-long-query-type - which queries should be killed once kill-long-queries-timeout has expired.
Example
Running the xtrabackup with the following options will cause xtrabackup to spend no longer than 3 minutes waiting for all queries older than 40 seconds to complete.

$ xtrabackup --backup --ftwrl-wait-threshold=40
–ftwrl-wait-query-type=all --ftwrl-wait-timeout=180
–kill-long-queries-timeout=20 --kill-long-query-type=all
–target-dir=/data/backups/
After FLUSH TABLES WITH READ LOCK is issued, xtrabackup will wait for 20 seconds for lock to be acquired. If lock is still not acquired after 20 seconds, it will kill all queries which are running longer that the FLUSH TABLES WITH READ LOCK.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值