Skip to main content

aria2 speed & BitTorrent optimization

The complete performance guide: where speed actually comes from, the exact HTTP and BitTorrent settings that matter, disk and OS tuning, plus how to measure and debug a slow download. Tuned for anything from a Raspberry Pi to a 10 Gbps seedbox.

Last reviewed 2026-09 · aria2 v1.37.0

Before you start

Change these in ~/.aria2/aria2.conf, %USERPROFILE%\.aria2\aria2.conf, or pass them as CLI flags. See the options reference.

Where speed really comes from

“aria2 is slow” almost always means one of four bottlenecks. Fix them in order:

  1. Connection count. aria2's HTTP default is only max-connection-per-server=1. Raising it is the single biggest win on throttled links.
  2. Peer/tracker health (BitTorrent). Dead trackers or no forwarded port = no peers = 0 KB/s.
  3. Disk I/O. A saturated HDD turns a fast download into a stall. Preallocation and a disk cache fix this.
  4. OS limits. File-descriptor and TCP tuning matter once you push thousands of connections.

Also remember the ceiling isn't yours alone: server-side throttling, peering, and your line rate all cap the result. You can only remove your side's bottlenecks.

HTTP / FTP tuning

HTTP tuning options with their defaults and recommended values
OptionDefaultRecommendedEffect
max-connection-per-server18–16Parallel sockets per host — the biggest speed lever
split58–16Number of chunks the file is divided into
min-split-size20M1M–10MSmaller = more splits on smaller files (more overhead)
max-concurrent-downloads53–8Parallel files; too high starves each one
max-tries / retry-wait5 / 05 / 3–10Robustness on flaky hosts
timeout / connect-timeout60 / 6030 / 30Fail fast and retry instead of hanging
lowest-speed-limit010K–50KDrop stalled connections so retries pick a better one
max-overall-download-limit00 (or a cap)Global speed cap; set if you must share bandwidth
Aggressive HTTP block (fast, tolerant server)
max-concurrent-downloads=5
max-connection-per-server=16
min-split-size=1M
split=16
max-tries=5
retry-wait=5
timeout=30
connect-timeout=30
lowest-speed-limit=10K
file-allocation=falloc

If a server returns 429/403 or drops connections, lower -x/-s to 4–8 — sometimes “polite” is faster than “aggressive”.

BitTorrent tuning

The commands below are accurate and safe. The most common real cause of 0 KB/s is simply no reachable peers: no forwarded port and/or dead trackers.

High-performance BitTorrent block
# Discovery
enable-dht=true
bt-enable-lpd=true
enable-peer-exchange=true
listen-port=6888
dht-listen-port=6888

# Swarm scaling
bt-max-peers=128
bt-request-peer-speed-limit=50K     # drop slow, stalled peers
bt-tracker-connect-timeout=5
bt-tracker-timeout=5

# Seeding
seed-ratio=1.0                      # 0 = seed forever
seed-time=0
bt-save-metadata=true
follow-torrent=true

Forward one port for TCP and UDP (6888 above) on your router so peers can connect to you — otherwise you only reach out, which limits speed. Keep a fresh tracker list in bt-tracker; grab one from the tracker list.

Encryption (bt-require-crypto=true) can help with ISP shaping but may exclude some peers — test both ways. On private trackers, keep PEX/DHT off if the rules require it.

Disk & filesystem tuning

aria2 preallocates files before writing. The default is prealloc, which zero-fills the file and can pause the whole system on large downloads. Pick based on your storage:

file-allocation modes
ModeHow it worksBest for
fallocReserves space via posix_fallocate (near-instant on modern FS)Linux/macOS on ext4, XFS, btrfs, APFS — recommended
truncCreates a file header and truncates to size (sparse)Filesystems without falloc; quick but may fragment
preallocWrites zeros across the whole file (default)Portable fallback; slow on huge files
noneNo preallocation; file grows as it downloadsFlash/SD or when you want zero startup delay
file-allocation=falloc        # ext4/XFS/btrfs/APFS
disk-cache=64M                # batch writes in RAM (default 16M)
no-file-allocation-limit=64M  # preallocate only files above this size (optional)

OS & network tuning

# Linux: raise fd limit for the current shell, then run aria2
ulimit -n 65536
aria2c --max-concurrent-downloads=5 --max-connection-per-server=16 URL

Interactive hardware-optimized config generator

Pick your hardware to generate a tailored performance block for aria2.conf:


        

The generated block is a starting point — measure (next section) and adjust.

Measure & benchmark

Don't guess — measure. Two easy methods:

# 1. Live summary every 5 seconds from aria2 itself
aria2c --summary-interval=5 -x 16 -s 16 https://example.com/large.iso

# 2. Query a running daemon's current speed over JSON-RPC
curl -s http://127.0.0.1:6800/jsonrpc -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":"1","method":"aria2.getGlobalStat","params":["token:SECRET"]}'

Troubleshooting & FAQ

BitTorrent is 0 KB/s even with seeders

Cause: dead/old trackers or no inbound port.
Fix: add fresh trackers from the tracker list, enable DHT/LPD, and forward listen-port TCP+UDP on your router.

System freezes / 100% disk usage during downloads

Cause: preallocation and many small writes on an HDD.
Fix: file-allocation=falloc (or trunc), raise disk-cache, and reduce -x/max-concurrent-downloads.

Speed is capped much lower than my line

Cause: server-side throttle, a max-download-limit/max-overall-download-limit cap, or a slow proxy.
Fix: check limits (0 = unlimited), raise -x, and test without a proxy.

How many connections should I use?

aria2 caps max-connection-per-server at 16. Start at 16 for fast links, 8 for normal broadband, 4 when a server pushes back with 403/429.

How do I stop aria2 from saturating my connection?

Set max-overall-download-limit=50M and max-overall-upload-limit=5M. These cap totals across all downloads.

Does the disk-cache size matter on an SSD?

Less than on an HDD, but a modest cache (64M) still smooths writes and reduces wear. Don't set it larger than you can spare in RAM.