I know that Amazon Web Services has hosted mirrors that I can use to update my Ubuntu machines.
I know there is a tool called apt-fast that makes multiple connections to a mirror server to improve speed, but I'm concerned that increasing this kind of load on a mirror server isn't polite, but I still want a fast mirror, how can I optimize apt-fast with AWS?
Best Answer
apt-fast works in the same way common "download accelerators" work. It opens more connections than normal to the web server and then combines them all together for a speed boost.
Most sysadmins I know prevent this sort of thing by limiting the amount of concurrent connections from the same IP, afterall, if you're increasing the amount of connections to your computer, that's less bandwidth for other people.
However while investigating using Amazon's Ubuntu mirrors I found out that AWS is actually optimized for high connections, with lower overall throughput. So in other words, AWS optimizes serving HTTP totally opposite from what you'd think.
First install apt-fast:
Feel free to go through the config prompts, we're going to adjust them anyway.
Configure your system to use Amazon's mirrors.
Configure apt-fast to use more connections, by editing
/etc/apt/apt-fast.conf
:Find the
MIRRORS
line, and add every region you want to add as an additional mirror. Basically it'll hit these repositories in addition to what's in your sources list, mine looks like this:Find the
_MAXNUM=
line, and adjust to the number of concurrent connections, I'm using:apt-fast
command in place ofapt-get
, or you can just alias it.Things I've discovered: