[Yum-devel] [PATCH] timedhosts option, smarter mirror selection

James Antill james at fedoraproject.org
Fri Jan 27 16:04:22 UTC 2012


On Fri, 2012-01-27 at 13:18 +0100, Zdeněk Pavlas wrote:
> Added the 'timedhosts' option.
> 
> (speed, failures, timestamp) tuple is assigned to each host
> we've downloaded from.  Successful downloads update 'speed'
> and reset the failure count to zero.  Failures increment
> the failure counter.  Speed update code:
> 
> - assigns lower weight to old information
> - <1MB downloads are assumed not to be 100% accurate
> - simple 10:1 filtering
> 
> Updated the mirror selection code.  Try to find the best one,
> using the above mentioned information.
> 
> - every failure in a row halves the speed estimate
> - unknown or too old mirrors regress to default speed
> - pending downloads are assumed to eat bandwidth

 Don't make any of this public (Eg. th_load, th_save, th_dict and
timedhosts).

 There will also be "problems" due to things like private mirrors which
are slightly out of sync. (or even just higher priority MM mirrors) so
get 404s for some repodata/packages, but we'll want to download all the
packages they have from them.
 Esp. when we are downloading N things at once, it's not obvious that
404s are really that bad (certainly they are _much_ better than a
non-404 which is using half the speed, IMO).

 If you just remove the failures bit and make it all internal, ACK. If
you have an idea of how to make the failures detection better post that
(I have no idea, atm. :().



More information about the Yum-devel mailing list