Comments (6)
I would like to propose a slightly different solution. Instead of limiting by size, limit by time. Just download for 1 second and see how much was downloaded in that time. For a slow connection it might only be 1 MB but for a fast connection it could easily be 100MB.
So with fast connections in mind, why would 15MB be too big? 100 Mbps connections are widely available in many countries these days and this script would also be useful for datacenters where gigabit connections are really common.
from apt-select.
Nice suggestion/feature request. I'd say, to do this fairly, the process should:
- download the package list of the main plus updates channel for current LTS and most recent release (more or less what the main user base targets)
- repeat the download step at least 5 times
- each time, select a random package with a size under a reasonable threshold (e.g ~1MB to avoid wasting too much time/data)
from apt-select.
Indeed. Especially the randomized part is also quite useful to test if the server has fast disks and/or lots of disk cache. Although the maximum file size should be configurable I think. A 1MB file might not be a very useful benchmark for connections that go beyond a 100Mbps as that's less than a 10th of a second.
from apt-select.
This is an interesting suggestion. It would be ideal to keep it simple and choose a file that doesn't vary across distributions/architectures, maybe something like the list file ls-lR.gz
. That file is typically 15 MB or so, which is too big, but it would be trivial to stop downloading the file after a certain number of bytes are received.
However, we need to be careful when considering something like this since concurrent tests would need a significant disclaimer attached to them if it saturates the WAN port's bandwidth. That problem could be solved by running the tests synchronously, but could be very slow when testing more than a handful of mirrors...which seems ok given the benefits to the ranking it would yield if implemented as an optional argument.
from apt-select.
Agreed, limiting downloads by time (like 1 second) is a better approach. 15 MB isn't too big a file for weaker connections if you stop early, and as I mentioned before, it's trivial to stop after a certain size. It shouldn't be difficult to implement stopping after a time interval using threads and timeouts correctly.
from apt-select.
This is connected to #46 as it requires using http and ftp connections.
from apt-select.
Related Issues (20)
- parsing sources.list with https fails
- TypeError: not enough arguments for format string HOT 4
- mirrors.txt only has a single mirror to choose from HOT 6
- UnicodeEncodeError when listing mirror info with unicode chars HOT 2
- Traceback on Ubuntu 17.10 HOT 2
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 5: ordinal not in range(128) HOT 2
- Fails to consider `mirror` scheme HOT 5
- No instructions for uninstall provided HOT 4
- Invalid country. latam is not in ISO 3166-1 alpha-2 format HOT 3
- `AttributeError: 'Sources' object has no attribute 'APT_FILE'` HOT 2
- Provide more detailed environment usage instructions
- apt-select : Command not recognized HOT 1
- show scheme in output
- add verbose flag
- option to only select https HOT 4
- Option to search all mirrors or multiple mirrors HOT 2
- Linux Mint support HOT 3
- Skipping file generation - Connection refused
- Support for Ubuntu 24.04
- Has this been abandoned? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apt-select.