implement an rsync_bwlimit setting for object replicator

Change-Id: I8789d6e4d22de83db9a2760d51a94eb56a48c3b5
This commit is contained in:
Dieter Plaetinck 2013-03-11 11:15:41 -04:00
parent a2db3b6f32
commit 442fd83a8b
3 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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: