Software Sources - ping own country 1st?

Write suggestions and new ideas in here
More ideas here http://community.linuxmint.com/idea/welcome
Forum rules
No support questions here please.
No ideas for application developers here please. For example instead use GitHub for Cinnamon and Nemo.

Software Sources - ping own country 1st?

Postby ander111 on Thu Mar 13, 2014 1:35 am

Hi guys,

Sorry if this has already been discussed... I searched but couldn't find anything on it.

The "Select a Mirror" tool in Mint's Update Manager > Software Sources is terrific, the way it pings all available LM mirrors and lets you pick the fastest ones for your location.

I live in Canada, but on my system the tool always pings the U.S. servers first. Maybe that's because I'm using a couple of them—they're currently the fastest. I'd rather test the Canadian servers first—but for some reason, they're way, way down in the list and it takes the app a long time to get to them.

Wouldn't it make more sense for the app to ping the servers in the user's own country first, by default? Or at least to make that an option?

And BTW, how does LM know what country you're in? Do you specify that during setup? I don't remember. (The only other place I can think of is in the Weather panel item—but I don't think the system consults that setting, does it?)

Thanks, Ander
User avatar
ander111
Level 3
Level 3
 
Posts: 151
Joined: Sat Jul 17, 2010 5:18 am

Linux Mint is funded by ads and donations.
 

Re: Software Sources - ping own country 1st?

Postby andklein on Thu Mar 13, 2014 1:28 pm

ander111 wrote:
And BTW, how does LM know what country you're in? Do you specify that during setup?



I think it takes your timezone. That's what you set-up during the installation.
User avatar
andklein
Level 2
Level 2
 
Posts: 86
Joined: Tue Mar 11, 2014 10:08 am
Location: Augsburg

Re: Software Sources - ping own country 1st?

Postby ander111 on Fri Mar 14, 2014 9:39 pm

andklein wrote:I think it takes your timezone. That's what you set-up during the installation.

Yikes—so the system may assume that, for example, someone in Finland may live in South Africa?

As I'm sure you realize, a timezone is a slice of the entire planet—through both hemispheres, from one pole to the other. There's no corresponding relationship to Net infrastructure that I know of. It wouldn't make much sense to prioritize servers that way, especially where densely-populated countries are in lateral proximity.

Fun avatar, BTW.
User avatar
ander111
Level 3
Level 3
 
Posts: 151
Joined: Sat Jul 17, 2010 5:18 am

Re: Software Sources - ping own country 1st?

Postby xenopeek on Sat Mar 15, 2014 6:37 am

Looking in /usr/share/mintsources/petra/mintsources.conf for Linux Mint 16, you can easily find where mirrors are fetched from (...=removed lines for brevity; see the file on your system for full contents):
Code: Select all
...
[mirrors]
...
mirrors=/usr/share/python-apt/templates/LinuxMint.mirrors
base_mirrors=/usr/share/python-apt/templates/Ubuntu.mirrors
...

That this is the file to look at is found in a few seconds by either looking at output of `locate mintsources`, `dpkg -L mintsources`, or visiting the GitHub repository and browsing there (https://github.com/linuxmint/mintsources). If you want to remove servers from the mirror list, you can, though that file would be reset after a new version of mintsources would be installed.

County is determined from your LANG environment variable, as per the code in /usr/lib/linuxmint/mintSources/CountryInformation.py. So if `echo $LANG` gives you en_US.UTF-8 then yes, US mirrors would be tested first... It's a very easy way to guess your country, but it's far from perfect as many users will be using en_US outside the US.

There's a trade off between simplicity of use, and ability to configure for your specific needs. It's something you probably do once per installation, so is it really that important that it is very fast? Another recommendation on this forum, one I liked better, is to have mintsources abort testing of a mirror if while the test is ongoing it is taking too long and won't beat the fastest (of fastest few) mirrors already tested.

I personally prefer how mirror testing is done on Arch Linux, with reflector. Reflector I have set up to test the 15 most recently updated mirrors from my country and one neighboring country, and save the 5 fastest one from that to my mirror list. It takes 3.9 seconds to update my mirror list this way :wink: While it's simple enough for me to configure and use, I doubt average Linux Mint users would be happy with it. And there's the trade off.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14794
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Software Sources - ping own country 1st?

Postby ander111 on Sun Mar 16, 2014 7:50 pm

Thanks for your thoughtful reply.

xenopeek wrote:There's a trade off between simplicity of use, and ability to configure for your specific needs. It's something you probably do once per installation, so is it really that important that it is very fast?

I often compute on public WiFi connections that aren't especially fast. Also, there's the general Linux-geek philosophy that everything should be as customized and efficient as possible—especially when it's something you can't do in Windows. :?)

xenopeek wrote:Another recommendation on this forum, one I liked better, is to have mintsources abort testing of a mirror if while the test is ongoing it is taking too long and won't beat the fastest (of fastest few) mirrors already tested.

Sounds interesting, but how do you do that?

xenopeek wrote:I personally prefer how mirror testing is done on Arch Linux, with reflector. Reflector I have set up to test the 15 most recently updated mirrors from my country and one neighboring country, and save the 5 fastest one from that to my mirror list. It takes 3.9 seconds to update my mirror list this way :wink: ...

Great—I'll look into it (page here, in case anyone else is interested).

Re Update Manager, maybe it'd be a good idea to add a context-menu command where you could right-click a mirror, then select "Check mirrors in this country first"? Where should I submit a suggestion like that?
User avatar
ander111
Level 3
Level 3
 
Posts: 151
Joined: Sat Jul 17, 2010 5:18 am


Return to Suggestions & New Ideas

Who is online

Users browsing this forum: No registered users and 3 guests