[CentOS-mirror] Question about Mirror load Ddistribution

Anssi Johansson centos at miuku.net
Sun Aug 26 11:10:51 EDT 2012

John Ricketts kirjoitti:
> I am curious about how the mirrors are load balanced...
> For example, when I do my own "yum update" on the very machine that 
> hosts the mirror, it determines that my localhost machine isn't the 
> fastest site. In fact, I don't get as much traffic as I had anticipated 
> in general.
> If this is explained elsewhere, please excuse my not RTFM'ing.

For those using the yum-fastestmirror plugin, the fastest mirror is 
determined by the time it takes to resolve the mirror name and to 
connect to the server's TCP port. In particular, it does not measure the 
bandwidth from the mirror. This method isn't perfect, but it does 
usually pick one of the nearest mirrors. Sometimes there are some 
oddities, as you have noticed.

Try sort -k 2 /var/cache/yum/x86_64/6/timedhosts.txt or sort -k 2 
/var/cache/yum/timedhosts.txt , those commands will list the connection 
times to the mirrors yum knows about, sorted by measured connection time.

http://miuku.net/tmp/testconnectiontime.py.txt can be used for running 
connection time benchmarks on your own. That script has been extracted 
from yum-fastestmirror.

More information about the CentOS-mirror mailing list