Git Product home page Git Product logo

Comments (6)

wolph avatar wolph commented on August 19, 2024 2

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.

JPvRiel avatar JPvRiel commented on August 19, 2024

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.

wolph avatar wolph commented on August 19, 2024

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.

jblakeman avatar jblakeman commented on August 19, 2024

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.

jblakeman avatar jblakeman commented on August 19, 2024

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.

jblakeman avatar jblakeman commented on August 19, 2024

This is connected to #46 as it requires using http and ftp connections.

from apt-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.