Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2008 11:27:31 -0500
From:      Wesley Shields <wxs@FreeBSD.org>
To:        Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Cc:        Alexey Shuvaev <shuvaev@physik.uni-wuerzburg.de>, freebsd-ports@freebsd.org
Subject:   Re: ports/128754: [port infrastructure] implement master sites randomization
Message-ID:  <20081111162731.GB74163@atarininja.org>
In-Reply-To: <eug34ZXB3oCwzaFhy76lDCxgwDo@L0uXKD5VodxBs2kecYjbmbfI7F4>
References:  <20081110155616.DA66A1AF424@void.codelabs.ru> <20081111032350.0b22a853@gumby.homeunix.com> <20081111153554.GA4294@wep4035.physik.uni-wuerzburg.de> <eug34ZXB3oCwzaFhy76lDCxgwDo@L0uXKD5VodxBs2kecYjbmbfI7F4>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 11, 2008 at 07:19:03PM +0300, Eygene Ryabinkin wrote:
> Tue, Nov 11, 2008 at 04:35:54PM +0100, Alexey Shuvaev wrote:
> > On Tue, Nov 11, 2008 at 03:23:50AM +0000, RW wrote:
> > > On Mon, 10 Nov 2008 18:56:16 +0300 (MSK)
> > > I think it would be sensible to seed srand from a hash of something
> > > reproducible to make better use of caches - maybe DISTNAME+DISTVERSION.
> > >
> > Maybe I don't understand something, but is RANDOMIZE_MASTER_SITES
> > (see bsd.port.mk for details) not enough? It affects though all
> > sites, not only SF.
> 
> It is enough, but it requires /usr/games/random to be present.  Not all
> servers have 'games' distribution installed, but I want them to
> randomize master sites.
> 
> For the feeding the hashes: RW, do you mean HTTP caches?  In principle,
> this is a neat idea: it will achieve load-balancing between the sites.
> But as it will use the same master sites order for the given port, this
> will be failing when the first download site is almost down: the
> download will take very long.  But probably stable order of the sites
> can be made settable via the variable, e.g.
> RANDOMIZE_MASTER_SITE_REPRODUCIBLY.  Will it be fine?  Please, note that
> this can be achievable only for the awk script: random(6) can not be
> currently directed to do this.

As a side-note to your discussion:

If your concern is to pick sites which are fast for you, you may want to
look at ports-mgmt/fastest_sites.  It handles almost all MASTER_SITE_FOO
definitions and is designed to sort based upon round-trip time for the
TCP handshake to complete (best guess for least effort).  The output is
suitable for inclusion into make.conf.

-- WXS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081111162731.GB74163>