Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aria2c parallel download parameters

I am reading the Aria2c download manager documentation and some parameters seem redundant to me. For example:

-x
The maximum number of connections to one server for each download. Default: 1

-j
Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5

-s
Download a file using N connections. ... Default: 5

From my pov, -x and -j/-s settings are contradicting. If -x is 1 and -j is 5, which takes priority? What is the combination of these three parameters I need to use to maximize one file download? download of multiple files?

like image 228
lotrus28 Avatar asked Mar 14 '19 15:03

lotrus28


2 Answers

-s: how many mirrors to use to download each file, mirrors should be listed in one line
-j: how many files (lines in the input file) to download simultaneously
-x: how many streams to use for downloading from each mirror.

So, if it is just one file, it goes like this:

aria2 -d ./ -x 10 "ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR209/ERR209558/ERR209558_1.fastq.gz"

If you need to download a number of files, use -i to feed the input file, then go like this:

aria2 -d ./aria_dl/ -x 16 -j 16 -i ./aria_list_of_files.txt

That implies that you have only one link in each line, and aria2 will use 16 streams for each of 16 files it is downloading. If you have multiple mirrors, put all mirrors for each file in one line and add -s N, where N is the maximum number of mirrors.

like image 56
lotrus28 Avatar answered Oct 11 '22 22:10

lotrus28


I found the best way to download concurrently via aria2

`aria2c -c -s 16 -x 16 -k 1M -j 1 -i dl.txt`


-c, --continue [true|false]
-s, --split=<N>
-x, --max-connection-per-server=<NUM>
-k, --min-split-size=<SIZE>
-j, --max-concurrent-downloads=<N>
-i, --input-file=<FILE>

NOTE: Downloads the URIs listed in FILE. You can specify multiple sources for a single entity by putting multiple URIs on a single line separated by the TAB and CR(Enter) character.

like image 34
Mehrdad Qasemkhani Avatar answered Oct 11 '22 23:10

Mehrdad Qasemkhani