another tweak to the congestion mitigator

This commit is contained in:
Ryan Tucker 2010-01-24 10:29:19 -05:00
parent f246975ce4
commit b471ad45e8

View file

@ -120,7 +120,7 @@ class SlowFile:
else: else:
# we're late; something got slow. # we're late; something got slow.
lateness = starttime - self.lastblocktargettime lateness = starttime - self.lastblocktargettime
self.delayfactor += min(0.2, lateness) self.delayfactor += min(0.5, lateness)
logger.debug('%.2f seconds late (congestion?); setting delayfactor to %.2f' % (lateness, self.delayfactor)) logger.debug('%.2f seconds late (congestion?); setting delayfactor to %.2f' % (lateness, self.delayfactor))
targetspeed = self.speed/float(self.delayfactor) targetspeed = self.speed/float(self.delayfactor)