aria2
Big files, slow servers, many downloads, torrents
- Up to 10× faster when a server limits each connection
- BitTorrent, Metalink and mirrors built in
- A download server you control over RPC
All three download files from the command line, but they are built for different jobs. We ran them side by side on the same machine and the same test servers, and wrote down every number.
aria2
wget
curl
Mirrors and file hosts often cap the speed of a single connection. Our test server allowed 2 MiB/s per connection on a 24 MiB/s line. File size: 50 MB.
| Tool | Command | Seconds |
|---|---|---|
| wget | 24.0 | wget URL · 24.0 s |
| curl | 24.0 | curl -O URL · 24.0 s |
| aria2, 1 connection | 24.1 | aria2c URL · 24.1 s |
| aria2 -x16 -s16 | 12.2 | aria2c -x16 -s16 URL · 12.2 s |
| aria2 -x16 -s16 -k1M | 2.3 | aria2c -x16 -s16 -k1M URL · 2.3 s |
With one connection all three take 24 seconds; the server decides. aria2 with 16 connections took 12.2 seconds, because its default -k 20M splits a 50 MB file into only 2 pieces. With -k1M it used all 16 connections and finished in 2.3 seconds.
Twenty 2 MB files from a server that adds 80 ms of latency per request and caps each connection at 2 MiB/s. wget and plain curl fetch one file after another; curl --parallel and aria2 fetch several at a time.
| Tool | Command | Seconds |
|---|---|---|
| wget -i | 21.8 | wget -i urls.txt · 21.8 s |
| curl, one by one | 21.9 | xargs -n1 curl -O < urls.txt · 21.9 s |
| curl --parallel | 5.5 | curl --parallel --parallel-max 5 -O … · 5.5 s |
| aria2c -i | 4.5 | aria2c -i urls.txt · 4.5 s |
| aria2c -i -j16 -x4 | 2.0 | aria2c -i urls.txt -j16 -x4 -k1M · 2.0 s |
aria2 runs 5 downloads at a time by default, a bit faster than curl --parallel with the same limit. With -j16 -x4 it reached the line limit: 2.0 seconds against 21.8 for wget. All five runs produced identical files.
On a local server with no limit, all three downloaded the 50 MB file in under a second, and wget and curl were a little quicker than aria2, which first reserves disk space for the file. If one connection already fills your line, extra connections cannot add speed.
Measured during the same HTTP download. "Own memory" is what the program allocated for itself; the total adds shared system libraries.
wget is the leanest. aria2 needs more because it keeps a download engine, a disk cache and the BitTorrent code ready, but 4.5 MiB is still small: the official aria2 figures are 4–9 MiB.
We stopped each tool halfway through the throttled download and started it again. All three finished with a correct file: wget with -c, curl with -C -, aria2 with -c. aria2 even resumed without -c, because its .aria2 control file records which pieces are done. Note that aria2 reserves the full file size first, so a partial file already shows its final size.
Many download links redirect to a mirror. wget and aria2 follow redirects by default. curl does not: without -L it saved an empty file and still exited with code 0, so a script would not notice. Always use curl -L for downloads.
Checked against the documentation of each tool and, where possible, by running it.
| aria2 | wget | curl | |
|---|---|---|---|
| One file over many connections | Yes | No | No |
| One file from several mirrors at once | Yes | No | No |
| BitTorrent and magnet links | Yes | No | No |
| Metalink | Yes | Some builds | No |
| Resume an interrupted download | Yes | Yes | Yes |
| Remote control (RPC) | Yes | No | No |
| Mirror a whole website | No | Yes | No |
| Upload, 25+ protocols, APIs | No | No | Yes |
| Preinstalled on most Linux systems | No | Yes | Yes |
We ran every row except the last two against our test server, with our own values for the numbers; each produced the correct file.
| Task | wget | curl | aria2c |
|---|---|---|---|
| Download a file | wget URL | curl -O URL | aria2c URL |
| Save under another name | wget -O name.iso URL | curl -o name.iso URL | aria2c -o name.iso URL |
| Save into a folder | wget -P dir URL | curl --output-dir dir -O URL | aria2c -d dir URL |
| Resume | wget -c URL | curl -C - -O URL | aria2c -c URL |
| Limit the speed to 1 MiB/s | wget --limit-rate=1m URL | curl --limit-rate 1M -O URL | aria2c --max-download-limit=1M URL |
| Retry up to 10 times | wget --tries=10 URL | curl --retry 10 -O URL | aria2c --max-tries=10 URL |
| Send a header | wget --header="X-Key: 1" URL | curl -H "X-Key: 1" -O URL | aria2c --header="X-Key: 1" URL |
| Set the user agent | wget -U "Agent/1" URL | curl -A "Agent/1" -O URL | aria2c -U "Agent/1" URL |
| HTTP login | wget --user=U --password=P URL | curl -u U:P -O URL | aria2c --http-user=U --http-passwd=P URL |
| Download a list of URLs | wget -i urls.txt | xargs -n1 curl -O < urls.txt | aria2c -i urls.txt |
| Skip the certificate check | wget --no-check-certificate URL | curl -k -O URL | aria2c --check-certificate=false URL |
| Follow redirects | wget URL | curl -L -O URL | aria2c URL |
| One file over 16 connections | Not possible | Not possible | aria2c -x16 -s16 -k1M URL |
| Download a torrent | Not possible | Not possible | aria2c file.torrent |
| Copy a website | wget -r -np URL | Not possible | Not possible |
aria2c -x16 -s16 -k1Maria2c -i urls.txt -j16aria2caria2c --enable-rpc with a WebUIwget -r -npcurlwget or curl -L, already installed