more delayfactor tweaks; also fixing a filehead problem on restarts
This commit is contained in:
parent
e09b42797a
commit
f246975ce4
1 changed files with 3 additions and 2 deletions
|
@ -120,13 +120,13 @@ 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 += lateness
|
self.delayfactor += min(0.2, 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)
|
||||||
self.lastblocktargettime = time.time() + len/float(targetspeed)
|
self.lastblocktargettime = time.time() + len/float(targetspeed)
|
||||||
|
|
||||||
if time.time() > self.lastdebug+300:
|
if time.time() > self.lastdebug+60:
|
||||||
if self.delayfactor > 1:
|
if self.delayfactor > 1:
|
||||||
# reduce the penalty a bit
|
# reduce the penalty a bit
|
||||||
self.delayfactor -= 0.1
|
self.delayfactor -= 0.1
|
||||||
|
@ -288,6 +288,7 @@ else:
|
||||||
if glob.glob('%s/%s.*.tar.*' % (outLoc, host)):
|
if glob.glob('%s/%s.*.tar.*' % (outLoc, host)):
|
||||||
logging.info('Evidence of failed execution run prior! Finishing it.')
|
logging.info('Evidence of failed execution run prior! Finishing it.')
|
||||||
fileglob = '%s/%s.*.tar.*' % (outLoc, host)
|
fileglob = '%s/%s.*.tar.*' % (outLoc, host)
|
||||||
|
filehead = '%s/%s.*.tar.' % (outLoc, host)
|
||||||
else:
|
else:
|
||||||
logging.debug('Executing %s' % cmd)
|
logging.debug('Executing %s' % cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue