Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21449 - Speed optimized lists of thirdpartymirrors and portage's fetch order
Summary: Speed optimized lists of thirdpartymirrors and portage's fetch order
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: John Mylchreest (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 28806
Blocks: 10149
  Show dependency tree
 
Reported: 2003-05-21 19:22 UTC by Robin Johnson
Modified: 2011-10-30 22:35 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-21 19:22:39 UTC
Presently, for a given SRC_URI, portage first tries to fetch from the gentoo 
mirrors ($GENTOO_MIRRORS), then from the SRC_URI itself. If the SRC_URI 
utilizes thirdpartymirrors via mirror://FOO/path-and-filename, that is then 
used there.

There are two parts to this.
1. mirrorselect should be runable on thirdpartymirrors to produce an optimized 
list for each of the possible mirror sources on a per system basis.
2. portage should be able to select the fastest SRC_URI for each download 
between the GENTOO_MIRRORS and the actual SRC_URI value. In the case of 
thirdpartymirrors, this comes in even more crucial.

An example of this. If I wanted to fetch dev-db/mysql, a 12Mb download, I'm 
getting 60kb/s from oregonstate at the moment, and thats the fastest gentoo 
server from where I am. However, I used the fastest available MySQL mirror 
(mysql.mirrored.ca), I would be getting 900kb/s.

An idea for the implementation:
Selecting the fastest server is a process of exclusion. You generally still get 
the same result if you weed out many of the slow servers earlier.

G = total set of gentoo mirrors 
H = total set of mirrors for a given site mirror://mysql/

I = fastest subset of gentoo mirrors (present mirrorselect functionality)
J = fastest subset of site mirrors (simple extension of 
mirrorselect, /var/cache/edb/thirdpartymirrors.optimized?)

M = netselect run on merged I+J (run at fetch time from portage/ebuild)

then portage fetches from the best result of 'M'

one thing that should be improved in mirrorselect for this.
by default, we can select by latency, as that is a fair indicatior of speed to 
a given server.
however, being able to select by country [from IP] (http://ip-to-
country.com/database/), and by throughput to a given site would be a vast 
improvement, esp. for users of satellite internet (high throughput, but long 
latency).
Comment 1 Thomas Raschbacher gentoo-dev 2003-05-22 13:16:28 UTC
hmm.. sounds a bit complicated maybe..
u'd need quite huge lists of all src_uris in portage .. + possible download speed limitation + latency ..

Comment 2 Thomas Raschbacher gentoo-dev 2003-05-22 13:16:48 UTC
/me
Comment 3 John Mylchreest (RETIRED) gentoo-dev 2003-05-22 13:22:06 UTC
just my approach...

I think if it were to be done itll be in 2 stages.
1: mirrorselect to optimize thirdpartymirrors
2: portage to run netselect on gentoo_mirrors+optimized thirdpartymirrors when needed

2, in my mind might not be very efficient, and perhaps just use a thirdpartymirrors optimized file
but as for #1, I'm all for that idea

although itll have to somehoe move outside of the portage tree, to something like /var/cache/edb/thirdpartymirrors, and for portage to use that, if it exists

anyone against this?
Comment 4 Tobias Minich 2003-07-20 16:37:16 UTC
My few cents:
1. A new variable telling to use either gentoo first or the third party mirrors first, so something like 'USE_3RD_PARTY_MIRROR=YES emerge foobar' is possible
2. Perhaps this could be 'leveled up'. I set (e.g.) LOCATION=de which tells portage to use rsync.de.gentoo... and sets german/european mirrors for gentoo and third party stuff. Of course you should be able to supercede this via vars. I think this would speed up installs a lot without having to tinker with all the special vars.
3. (somewhat off topic, but this bugs be a lot lately) If the crc check fails, automatically refetch the file from the source URI.
Comment 5 Martin Holzer (RETIRED) gentoo-dev 2003-09-04 03:31:01 UTC
portage 2.0.49 is now rotation thirdparty mirrors
Comment 6 John Mylchreest (RETIRED) gentoo-dev 2003-09-17 12:49:25 UTC
not valid right now.
thirdpartymirrors is randomized by portage.
will muull over with carpaski one day
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-05 13:36:04 UTC
reopening as per discussion on -core at the moment.
Comment 8 SpanKY gentoo-dev 2004-01-07 22:31:25 UTC
/etc/portage/mirrors now supports 'favored' mirror selection
see portage(5) in portage-2.0.50_preX
Comment 9 John Mylchreest (RETIRED) gentoo-dev 2004-02-04 12:00:03 UTC
closing