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
- aria2 installed and on your
PATH. - Know your storage type (SSD or HDD) and RAM footprint — they decide the right values.
- Optional: for BitTorrent, a router where you can forward one TCP+UDP port.
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:
- Connection count. aria2's HTTP default is only
max-connection-per-server=1. Raising it is the single biggest win on throttled links. - Peer/tracker health (BitTorrent). Dead trackers or no forwarded port = no peers = 0 KB/s.
- Disk I/O. A saturated HDD turns a fast download into a stall. Preallocation and a disk cache fix this.
- 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
| Option | Default | Recommended | Effect |
|---|---|---|---|
max-connection-per-server | 1 | 8–16 | Parallel sockets per host — the biggest speed lever |
split | 5 | 8–16 | Number of chunks the file is divided into |
min-split-size | 20M | 1M–10M | Smaller = more splits on smaller files (more overhead) |
max-concurrent-downloads | 5 | 3–8 | Parallel files; too high starves each one |
max-tries / retry-wait | 5 / 0 | 5 / 3–10 | Robustness on flaky hosts |
timeout / connect-timeout | 60 / 60 | 30 / 30 | Fail fast and retry instead of hanging |
lowest-speed-limit | 0 | 10K–50K | Drop stalled connections so retries pick a better one |
max-overall-download-limit | 0 | 0 (or a cap) | Global speed cap; set if you must share bandwidth |
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.
# 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:
| Mode | How it works | Best for |
|---|---|---|
falloc | Reserves space via posix_fallocate (near-instant on modern FS) | Linux/macOS on ext4, XFS, btrfs, APFS — recommended |
trunc | Creates a file header and truncates to size (sparse) | Filesystems without falloc; quick but may fragment |
prealloc | Writes zeros across the whole file (default) | Portable fallback; slow on huge files |
none | No preallocation; file grows as it downloads | Flash/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)
- Disk cache by RAM: 16–32M (1–2 GB RAM), 64M (4–8 GB — the sweet spot), 128M (16 GB+).
- HDD + many connections is the classic stall: raise
disk-cacheand usefalloc; consider a small SSD cache. - etx4/XFS handle falloc well; network shares (SMB/NFS) may not — test with a large file.
OS & network tuning
- File descriptors: 16 connections per file adds up fast. Raise the limit:
ulimit -n 65536(Linux) before starting aria2. For a service, setLimitNOFILEin the systemd unit. - TCP congestion control: BBR often improves throughput on lossy links. Enable with
sysctl net.ipv4.tcp_congestion_control=bbr(if available). - Prefer wired + IPv4/IPv6 sanity: if IPv6 is broken on your host, set
disable-ipv6=trueto avoid slow fallbacks. - Proxies: a slow proxy caps everything; measure with and without
--all-proxy.
# 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"]}'
- Use a large file from a host that isn't itself the bottleneck (a big distro mirror or a public test file).
- Change one variable at a time (
-x, then-s, thendisk-cache) and compare. - Watch disk usage during the test — if it pegs at 100%, disk I/O is your limit, not the network.
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.
Related resources
- aria2.conf generator — build a full config visually
- Options reference — every flag used here, with examples
- BitTorrent tracker list — keep swarms alive
- yt-dlp + aria2 — accelerate media downloads
- Troubleshooting — common aria2 errors with exact fixes
- .aria2 file guide — resume and recover partial downloads