Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Wednesday, October 20, 2010

Browse » Home » , , , , , , , , , , , , , , , , , , , » Windows/LINUX : How to increase download speed in Linux/MAC/FreeBSD/OpenBSD/Ubuntu/BackTrack/OpenSUSE/Fedora/Windows?

Windows/LINUX : How to increase download speed in Linux/MAC/FreeBSD/OpenBSD/Ubuntu/BackTrack/OpenSUSE/Fedora/Windows?


 
Traditional file downloads are donevia an FTP client, a Web browser, or a file-sharing program such as BitTorrent.These means of downloading files will probably never change, but the tools todo the downloading, and how they download, will.

One program that changes how filesare downloaded is Aria2. Aria2 is a lightweight multiprotocol andmultisource download utility that offers some very compelling reasons for its useover traditional “single thread” downloading such as with an FTP or HTTPclient.
Being a multiprotocol client, Aria2can download via HTTP, via FTP, and via BitTorrent. 

What makes Aria2 unique isthat it can download the same file at the same time utilizing differentprotocols. It can also open multiple connections to the same, or different,URLs to download the file even faster. By default, Aria2 uses five connectionsto download a file.
DOWNLOAD Aria2 for All Linux Distributions
To download a file, use:
$aria2c http://somehost.com/file.zip
If the same file is available fromtwo different places, you can maximize your bandwidth and download it fromboth, even using different protocols:
$aria2c http://somehost.com/file.zip ftp://otherhost.com/pub/file.zip
To compare speeds, I used curl([DOWNLOAD])to download a bzip2 compressed ISO image that weighs in at 200MB:
$time curl -OLftp://ftp.ibiblio.org:21//pub/linux/distributions/annvix/releases/ISO/
annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
 % Total    % Received % Xferd  Average Speed  Time    Time     Time  Current
                                Dload  Upload   Total   Spent   Left  Speed
100 200M  100  200M    0    0   108k      0  0:31:27  0:31:27--:--:--  104k
curl:(28) FTP response timeout
curl-OL   0.57s user 2.04s system 0% cpu 31:27.27 total
With Aria2, I downloaded the samefile from three different places together:
$time aria2cftp://ftp.ibiblio.org:21//pub/linux/distributions/annvix/releases/ISO/
annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2http://gd.tuwien.ac.at/opsys/linux/annvix/
releases/ISO/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2http://ftp.cc.uoc.gr/mirrors/
linux/annvix/releases/ISO/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
 *** Download Progress Summary as of Thu May 1317:28:12 2010 ***
=============================================================================================
[#1SIZE:88.2MiB/200.4MiB(43%) CN:5 SPD:2.0MiBs ETA:55s]
FILE:/home/user/tmp/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
---------------------------------------------------------------------------------------------
 *** Download Progress Summary as of Thu May 1317:29:12 2010 ***
=============================================================================================
[#1SIZE:167.6MiB/200.4MiB(83%) CN:5 SPD:559.9KiBs ETA:59s]
FILE:/home/user/tmp/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
----------------------------------------------------------------------------------------------
[#1SIZE:200.3MiB/200.4MiB(99%) CN:5 SPD:192.3KiBs]
2010-05-1317:29:57.277148 NOTICE - Download complete: /home/user/tmp/
annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
DownloadResults:
gid|stat|avgspeed  |path/URI
===+====+===========+===========================================================
 1|  OK|  1.2MiB/s|/home/user/tmp/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
StatusLegend:
 (OK):download completed.
aria2c    0.53s user 4.62s system 3% cpu 2:45.08 total
What an amazing difference in speed!To verify that both files downloaded are identical, I ran md5sum against bothfiles:

$md5sum o/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
a7d1e84533a27daf8fe794256ca1f928 o/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
a7d1e84533a27daf8fe794256ca1f928 annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
%ls -al o/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
-rw-r--r--1 user user 210219877 May 13 17:29annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
-rw-r--r--1 user user 210219877 May 13 17:25o/annvix-netinstall-x86_64-3.0-RELEASE-r2.iso.tar.bz2
The files are indeed identical.
What if you are at work when the newrelease of your favourite Linux distribution becomes available? Instead ofusing BitTorrent at work which may go against company usage policies, if youare able to SSH to your home system, you can launch Aria2 under screen andbegin the download from there. If you want to download a number of files atonce, you can have Aria2 download them sequentially or in parallel; to downloadfiles in parallel use:
$aria2c -Z http://somehost.com/file.zip linuxdistro.torrent
Aria2 allows you to specify themaximum upload rate when downloading torrents. 
This can be done with the “-u”option, such as-u40K” would only allow an upload speed of 40KB/s. 

In fact,Aria2 is a full-featured BitTorrent client with a lot of features such assupport for seeding files, downloading files with encryption, and DHT(Distributed Hash Table) support.
While some might balk at the use ofa command-line client to download files, perhaps cringing at the remembrance ofold-school FTP clients, Aria2 is easy to use and easy to script.

The speed gains of Aria2 areincredible. If BitTorrent isn’t your thing, imagine finding five differentmirrors of your favourite Linux distribution and passing the URLs to Aria2.Possibly the longest part of that would be finding the URLs and pasting it tothe command-line, rather than the actual downloading.

Command-line scares you off? No, aria2 is really easy to use!!

 

SOME USAGE TECHNIQUES :- 

Download from WEB

$ aria2c http://example.org/mylinux.iso

Download from 2 sources

$ aria2c http://a/f.iso ftp://b/f.iso

BitTorrent

$ aria2c http://example.org/mylinux.torrent

BitTorrent Magnet URI

$ aria2c 'magnet:?xt=urn:btih:248D0A1CD08284299D
E78D5C1ED359BB46717D8C'

Metalink

$ aria2c http://example.org/mylinux.metalink

Download URIs found in text file

$ aria2c -i uris.txt
Thanks...
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top