[mirror-admin] fastestmirror (was Re: Redirecting Rawhide to Private Mirrors)

Andrew McNabb amcnabb at mcnabbs.org
Fri Apr 24 12:46:39 EDT 2009


On Thu, Apr 23, 2009 at 01:38:52PM -0500, Gilbert E. Detillieux wrote:
>
> It really comes down to these 3 lines of Python code (in  
> /usr/lib/yum-plugins/fastestmirror.py)...
>
>                     time_before = time.time()
>                     sock.connect((self.host, self.port))
>                     result = time.time() - time_before
>
> Any Python wizards out there who'd be willing to give it a shot?

I've whipped together a patch that does a slightly better job of
measuring mirrors.  Instead of just timing how long it takes to connect,
it times how long it takes to download repomd.xml from the mirror.  This
still isn't perfect, since repomd.xml isn't particularly large, but the
results should be much more sane than what we're currently seeing.  The
patch is posted to bug 484371:

https://bugzilla.redhat.com/show_bug.cgi?id=484371

It would probably be helpful if someone tests it out and posts a comment
to the bug report.

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

--


More information about the Mirror-admin mailing list