Advanced

Drastically Improve 'apt-get install' And 'upgrade' Speed [How-to]

Posted by hotice on · 8 comments
Web Upd8; By Matt Parnell
Mail this story
Print this story

What if we could use a bash script to use "apt-get" with Axel (a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file) so the "apt-get" download speed would increase dramatically? Well, you can, thanks to Matt Parnell who has created a bash script which does just that.

Full Story

  Nav
» Read more about: Story Type: News Story

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (8)

The big question is, does it actually help? All the Debian and Ubuntu mirrors I have used so far don't cap the download speed (or cap it at such a high level that my 8 Mbit connection never reached it). Under those circumstances Axel doesn't help at all.
I discovered that these "download accelerators" are pure crap a long time ago. I wonder how people still believe they help at all.
Sometimes they help, but only if:

* The server you download from uses rate-limiting * Your internet connection is faster that the rate-limit on the server * Your internet connection is slower than the connection of the server * The server does not check IP addresses/sessions for rate-limiting

Only then does download accelleration work. With bandwidth being cheap, abundant and sold on fixed-fee it's increasingly unlikely that a server uses rate-limiting. Personally I would only rate-limit a server if you rent a pipe to internet that has to be paid by the percentile. In that case a traffic spike could cost a lot of money because it affects the price on an entire month worth of bandwidth. And in such cases it's probably still better to use a firewall with QoS and traffic shaping to manage all connections instead or rate-limiting individual connections.
The thing is that Axel downloads multiple files simultaneously, as opposed to apt-get. So it's not that it accelerates the download as in makes your internet faster, but it simply finishes the job in less tine.

Try to install something using apt-get and something using apt-fast. You will notice the difference...
@Sander: do I need to meet all those conditions, or just one? :)

@hotice: apt-get downloads files simultaneously if they're from different hosts. And I can't for the life of me see how downloading 1 file at 1000kbit (let's assume that's my local bandwidth cap) is slower than downloading 5 files at 200kbit each...
Unless you have slow mirrors. This is where things like the Entropy package manager have a bit of polish. Adding in --multifetch=n , n being some number from 1 to 10 creates an aggregated download that will pull packages from a variety of slower mirrors upping your throughput to the max of your connection speed.

Much like while wget is nice, aria2 works even better as it will do concurrent segments to optimize throughput.
@hotice: apt-get is deprecated. Aptitude is the new default and it does download files simultaneously.

Quoting:Unless you have slow mirrors.


I don't. My mirrors are fast enough to saturate my 8 Mbit home connection. Perhaps it helps that I am in The Netherlands. There's bandwidth a-plenty, only 17 million inhabitants and network-wise I'm real close to the Amsterdam Internet Exchange (the biggest and fastest in the world).
I agree with azerthoth about aria2c. It's really nice. I've used it to pull down packages on some of the Slackware derivatives which don't have a package manager with the features of aptitude.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post