mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-02-28 02:07:54 +08:00
pt-osc: added --sleep option. Useful when load or lag checking is not possible
This commit is contained in:
@@ -9260,6 +9260,12 @@ sub main {
|
||||
$sys_load_pr->start() if $sys_load_pr;
|
||||
$sys_load->wait(Progress => $sys_load_pr);
|
||||
|
||||
# sleep between chunks to avoid overloading PXC nodes
|
||||
my $sleep = $args{NibbleIterator}->{OptionParser}->get('sleep');
|
||||
if ( $sleep ) {
|
||||
sleep $sleep;
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
done => sub {
|
||||
@@ -11495,6 +11501,15 @@ value of C<10000>.
|
||||
|
||||
The tool prints a warning and continues if a variable cannot be set.
|
||||
|
||||
=item --sleep
|
||||
|
||||
type: float; default: 0
|
||||
|
||||
How long to sleep (in seconds) after copying each chunk. This option is useful
|
||||
when throttling by L<"--max-lag"> and L<"--max-load"> are not possible.
|
||||
A small, sub-second value should be used, like 0.1, else the tool could take
|
||||
a very long time to copy large tables.
|
||||
|
||||
=item --socket
|
||||
|
||||
short form: -S; type: string
|
||||
|
||||
Reference in New Issue
Block a user