You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/interactive-commands.md
+1
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ replication lag on to determine throttling
21
21
-`max-load=<max-load-thresholds>`: modify the `max-load` config; applies on next running copy-iteration
22
22
The `max-load` format must be: `some_status=<numeric-threshold>[,some_status=<numeric-threshold>...]`. For example: `Threads_running=50,threads_connected=1000`, and you would then write/echo `max-load=Threads_running=50,threads_connected=1000` to the socket.
23
23
-`critical-load=<load>`: change critical load setting (exceeding given thresholds causes panic and abort)
24
+
-`nice-ratio=<ratio>`: change _nice_ ratio: 0 for aggressive, positive integer `n`: for any unit of time spent copying rows, spend `n` units of time sleeping.
24
25
-`throttle-query`: change throttle query
25
26
-`throttle-control-replicas`: change list of throttle-control replicas, these are replicas `gh-ost` will cehck
Copy file name to clipboardexpand all lines: go/cmd/gh-ost/main.go
+1
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,7 @@ func main() {
71
71
flag.BoolVar(&migrationContext.SwitchToRowBinlogFormat, "switch-to-rbr", false, "let this tool automatically switch binary log format to 'ROW' on the replica, if needed. The format will NOT be switched back. I'm too scared to do that, and wish to protect you if you happen to execute another migration while this one is running")
72
72
chunkSize:=flag.Int64("chunk-size", 1000, "amount of rows to handle in each iteration (allowed range: 100-100,000)")
73
73
defaultRetries:=flag.Int64("default-retries", 60, "Default number of retries for various operations before panicking")
74
+
flag.Int64Var(&migrationContext.NiceRatio, "nice-ratio", 0, "force being 'nice', imply sleep time per chunk time. Example values: 0 is aggressive. 3: for every ms spend in a rowcopy chunk, spend 3ms sleeping immediately after")
74
75
75
76
flag.Int64Var(&migrationContext.MaxLagMillisecondsThrottleThreshold, "max-lag-millis", 1500, "replication lag at which to throttle operation")
76
77
flag.StringVar(&migrationContext.ReplictionLagQuery, "replication-lag-query", "", "Query that detects replication lag in seconds. Result can be a floating point (by default gh-ost issues SHOW SLAVE STATUS and reads Seconds_behind_master). If you're using pt-heartbeat, query would be something like: SELECT ROUND(UNIX_TIMESTAMP() - MAX(UNIX_TIMESTAMP(ts))) AS delay FROM my_schema.heartbeat")
0 commit comments