[Yum-devel] Fastest mirror selection plugin

Luke Macken lmacken at redhat.com
Mon Nov 28 00:52:49 UTC 2005


On Sun, Nov 27, 2005 at 07:52:31PM +0200, Panu Matilainen wrote:
| On Thu, 2005-11-17 at 04:59 -0500, Luke Macken wrote:
| 
| > | Next thing I have in mind wrt this is to add persistance - calculate the 
| > | mirrors once and store them someplace and only recalculate every now and 
| > | then, a simple approach would be "if the mirrorlist is older than a day or 
| > | week" or something. Another thing I thought about is recalculate when 
| > | network mask changes: desktops and servers typically don't much move 
| > | around but a laptop can move around a lot and affect the optimal mirror 
| > | selection.
| > 
| > Not a bad idea.  I might try and hack something together this week that
| > talks with NetworkManager and stores the current location and mirrorlist
| > locally.
| 
| Here's a quick-n-dirty version which after initial timings stores the
| host timings into a file and populates timedhosts from that on
| consecutive runs, certainly makes a big difference.
| 
| http://laiskiainen.org/yum/plugins/fastestmirror/fastestmirror-persistent.py

I merged your changes in 0.2.2[0], and also made 'hostfilepath' a
configuration option instead of hardcoding it.  Aside from being
'quick-n-dirty', it works fine for now, and definitely makes a
difference.  We might also want to be able to configure after how many
runs to update the host list, or something of the sort.


luke

[0]: http://people.redhat.com/lmacken/fastestmirror.py



More information about the Yum-devel mailing list