legendary
legendary copied to clipboard
[Feature Request] Limit download speed.
First I gotta say this is a great utility.
Back on topic, I would like to limit the speed at which games are downloaded, so it doesn't take all my bandwidth.
Thank you.
This is much harder to do than you might think, especially when working with multiple workers and all that. For the time being you can use --max-workers
to reduce the number of downloads that run in parallel. Reducing this to 1 or 2 will already throttle downloads quite significantly.
Using --max-workers
seems like a good alternative to limiting the download speeds on a hard cap, and it should work for my purposes.
Thank you.
This is a really good suggestion, would love to see this in the future too. For the moment I'm using another application called netlimiter to limit the download rate in a more controlled way.
What about a per worker limit at least?
This feature is essential for dealing with my terrible and sadly non-improvable internet speeds, without downloading games causing all other traffic to basically stop network-wide. My router seems to entirely lack QoS.
This is much harder to do than you might think, especially when working with multiple workers and all that.
Yeah I can definitely understand the difficulty. The user may ask for "10MB/sec", and one worker may be doing 0.5MB/sec and another may be doing 9.5MB/sec". So a plain "10MB/sec divided by total workers = hard cap on each worker" would not be an accurate way to limit speeds, since that would be "5MB/sec per worker" and would end up only running at 5.5MB/sec total then.
All workers would instead need communication with each other to somehow organize speeds. And even that sounds like a mess, since speeds could fluctuate rapidly, which would make it very hard to ensure all of the workers still hit the target speed (not under/over).
But even though it's hard, it's also a solved problem. Various download managers have the feature of limiting total speed while doing multi-threaded downloads. It seems like aria2 also has that feature.
I wonder if it would be possible to port the downloading code to the aria2 library to get the "multithreaded downloads + speed limit" features that way?