Date: Tue, 11 Nov 2008 16:35:54 +0100 From: "Alexey Shuvaev" <shuvaev@physik.uni-wuerzburg.de> To: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Cc: freebsd-ports@freebsd.org Subject: Re: ports/128754: [port infrastructure] implement master sites randomization Message-ID: <20081111153554.GA4294@wep4035.physik.uni-wuerzburg.de> In-Reply-To: <20081111032350.0b22a853@gumby.homeunix.com> References: <20081110155616.DA66A1AF424@void.codelabs.ru> <20081111032350.0b22a853@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 11, 2008 at 03:23:50AM +0000, RW wrote: > On Mon, 10 Nov 2008 18:56:16 +0300 (MSK) > Eygene Ryabinkin <rea-fbsd@codelabs.ru> wrote: > > > > Today I was hit by the very bad connectivity with twaren.net and > > nchc.dl.sourceforge.net (the first site in the SF mirrors list in the > > FreeBSD ports .mk files) is hosted by Taiwan REN. So, I decided to > > implement simple randomization that will enable to evenly distribute > > the downloads between SF mirrors. > > > > ... > > +# Need to drop a couple of initial rand() values: they tend > > +# to be around 0.8 - 0.9, so for fairly small array lenght > > +# they will produce identical values at the beginning. > > + srand(); rand(); rand(); rand(); rand(); > > 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. Just my 0.02$, Alexey.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081111153554.GA4294>