Multi-threaded file download for Linux | INTROSERV

Multi-threaded file download for Linux

Is multi-threading available in Linux?

Yes, Linux supports multi-threading. In Linux terminology, this capability is commonly referred to as Simultaneous Multithreading (SMT) or Hyper-Threading. When multi-threading is enabled, a single physical CPU core is mapped to multiple logical processors, allowing multiple threads to be executed simultaneously during each CPU cycle.

Multi-threading allows one physical processor to appear as several virtual processors, each executing parallel code streams. This improves performance by allowing concurrent execution of multiple threads, increasing system efficiency and reducing overall latency.

The implementation of multi-threading in Linux depends on the CPU architecture. Some processors, such as Intel Pentium, support SMT, while others, such as AMD Athlon, do not. Linux distributions typically detect SMT support automatically and configure it accordingly. When enabled, logical processors can execute multiple threads concurrently, allowing the operating system to efficiently distribute workloads and improve throughput and responsiveness.

Axel – a utility for faster file downloads

Axel is a download utility designed to improve download performance by using multiple connections for a single file. According to its developers, Axel can increase download speed by up to 60%.

One of Axel’s key features is its support for multiple protocols, including HTTP, HTTPS, FTP, and FTPS. This flexibility allows users to download files from a wide range of sources.

By opening several connections simultaneously, Axel significantly reduces waiting time and improves the overall download experience.

Axel uses optimized algorithms to distribute resources efficiently and eliminate bottlenecks during the download process. In addition to speed improvements, it supports resuming interrupted downloads and allows users to pause and continue downloads at any time.

Installation

Ubuntu/Debian:

apt install axel

CentOS/RHEL:

yum install epel-release && yum install axel

Fedora:

dnf install axel

To perform a simple download using Axel, run:

axel https://nl.lg.introserv.eu/1000MB.test

-a enables an alternative progress indicator:

axel -a https://nl.lg.introserv.eu/1000MB.test

You can limit the maximum download speed using --max-speed or the short option -s. The value is specified in bytes per second:

axel --max-speed=512000 https://nl.lg.introserv.eu/1000MB.test

To save the file under a different name, use the -o option:

axel -o gigabyte.test https://nl.lg.introserv.eu/1000MB.test

Specify the maximum number of connections using -n:

axel -n 10 https://nl.lg.introserv.eu/1000MB.test

aria2

aria2 is a command-line download utility that supports HTTP(S), FTP, BitTorrent, and Metalink protocols.

How does aria2 work?

aria2 uses a BitTorrent-like approach to distribute downloads across multiple connections. Instead of relying on a single connection, it splits the download into segments and transfers them in parallel, significantly increasing download speed.

Features of aria2

  • High configurability: You can define the number of connections, speed limits, and many other parameters.
  • Resume and retry: If a connection is interrupted, aria2 can automatically resume the download.
  • File integrity verification: Ensures that downloaded files are not corrupted.
  • Secure connections: Supports HTTPS and FTPS.
  • Torrent support: Allows downloading large files via BitTorrent.

Installation of aria2

Ubuntu/Debian:

apt install aria2

CentOS/RHEL:

yum install aria2

Fedora:

dnf install aria2

Simple download using aria2:

aria2c https://nl.lg.introserv.eu/1000MB.test

Download the same file from two HTTP servers:

aria2c "https://nl.lg.introserv.eu/1000MB.test" "https://uk.lg.introserv.eu/1000MB.test"

Download simultaneously from HTTP and FTP servers:

aria2c --ftp-user=<USER> --ftp-passwd=<PASSWD> "ftp://<ftpserver_ip>/<file>" "https://uk.lg.introserv.eu/1000MB.test"

Download using two connections:

aria2c -x2 -k1m https://nl.lg.introserv.eu/1000MB.test

Set the number of concurrent downloads with -j:

aria2c -j2 https://nl.lg.introserv.eu/1000MB.test https://uk.lg.introserv.eu/1000MB.test

Conclusion

Axel and aria2 are powerful command-line utilities for downloading files on Linux. Both support multiple connections and resuming interrupted downloads. Axel is lightweight and easy to use, while aria2 offers advanced features such as BitTorrent support and file integrity verification.

VAT

  • Other

    Other

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    %
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • Other
  • canada
  • poland
  • european-union
  • france
  • germany
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria