diff --git a/doc/manpages/object-server.conf.5 b/doc/manpages/object-server.conf.5 index 74a13761bb..5c052d8108 100644 --- a/doc/manpages/object-server.conf.5 +++ b/doc/manpages/object-server.conf.5 @@ -194,6 +194,8 @@ Interval in seconds between logging replication statistics. The default is 300. Max duration of a partition rsync. The default is 900 seconds. .IP \fBrsync_io_timeout\fR Passed to rsync for I/O OP timeout. The default is 30 seconds. +.IP \fBrsync_bwlimit\fR +Passed to rsync for bandwith limit in kB/s. The default is 0 (unlimited) .IP \fBhttp_timeout\fR Max duration of an HTTP request. The default is 60 seconds. .IP \fBlockup_timeout\fR diff --git a/etc/object-server.conf-sample b/etc/object-server.conf-sample index 940b354300..294331f85b 100644 --- a/etc/object-server.conf-sample +++ b/etc/object-server.conf-sample @@ -95,6 +95,8 @@ use = egg:swift#recon # stats_interval = 300 # max duration of a partition rsync # rsync_timeout = 900 +# bandwith limit for rsync in kB/s. 0 means unlimited +# rsync_bwlimit = 0 # passed to rsync for io op timeout # rsync_io_timeout = 30 # max duration of an http request diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index 92b7591a44..21d59d0822 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -71,6 +71,7 @@ class ObjectReplicator(Daemon): self.run_pause = int(conf.get('run_pause', 30)) self.rsync_timeout = int(conf.get('rsync_timeout', 900)) self.rsync_io_timeout = conf.get('rsync_io_timeout', '30') + self.rsync_bwlimit = conf.get('rsync_bwlimit', '0') self.http_timeout = int(conf.get('http_timeout', 60)) self.lockup_timeout = int(conf.get('lockup_timeout', 1800)) self.recon_cache_path = conf.get('recon_cache_path', @@ -145,6 +146,7 @@ class ObjectReplicator(Daemon): '--ignore-existing', '--timeout=%s' % self.rsync_io_timeout, '--contimeout=%s' % self.rsync_io_timeout, + '--bwlimit=%s' % self.rsync_bwlimit, ] node_ip = rsync_ip(node['replication_ip']) if self.vm_test_mode: