介绍一个多线程下载工具Axel

Posted on Fri 11 November 2011 in it

介绍

主页:http://axel.alioth.debian.org/ 和wget和curl相比,最大的亮点是支持多线程。

Axel tries to accelerate HTTP/FTP downloading process by using multiple connections for one file. It can use multiple mirrors for a download.

效果

多线程与单线程下载效果对比:195.61 KB/s VS 88.5 KB/s

axel -o . -n 5 http://li3huo.com/abigfile Initializing download: http://li3huo.com/abigfile File size: 2964966 bytes Opening output file ./1.zip Starting download

[ 0%] .......... .......... .......... .......... .......... [ 58.5KB/s] .......... [ 98%] .......... .......... .......... .......... .....

Downloaded 2895.5 kilobytes in 14 seconds. (195.61 KB/s)

wget http://li3huo.com/1.zip --2011-11-11 15:13:02-- http://li3huo.com/abigfile Resolving li3huo.com... 184.82.4.168 Connecting to li3huo.com|184.82.4.168|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2964966 (2.8M) [application/zip] Saving to: `abigfile.1' 100%[======================================>] 2,964,966 124K/s in 33s 2011-11-11 15:13:36 (88.5 KB/s) - `1.zip.1' saved [2964966/2964966]

注意

如果服务器不支持http1.1,例如CherryPy之类的,就享受不到多线程下载的速度了

axel -n 5 -vo . http://107.xx.yy.zz/CloudScan/bigfile Initializing download: http://107.xx.yy.zz/CloudScan/bigfile Opening output file /home/liyan//bb.tgz Server unsupported, starting from scratch with one connection. Starting download ..........