Skip to content

Instantly share code, notes, and snippets.

@link89
Last active November 21, 2023 07:22
Show Gist options
  • Save link89/b61428cda13a07b43fcf04b97a620a6d to your computer and use it in GitHub Desktop.
Save link89/b61428cda13a07b43fcf04b97a620a6d to your computer and use it in GitHub Desktop.
Tips on improve download speed

Improve Download Speed

Use BBR congestion control

Ubuntu

Update /etc/sysctl.conf

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

And run the following command to apply and check

sudo sysctl -p
sysctl net.ipv4.tcp_congestion_control

Windows

Open Powershell with admin permission and run the following command

netsh int tcp set supplemental Template=Internet CongestionProvider=bbr2
netsh int tcp set supplemental Template=Datacenter CongestionProvider=bbr2
netsh int tcp set supplemental Template=Compat CongestionProvider=bbr2
netsh int tcp set supplemental Template=DatacenterCustom CongestionProvider=bbr2
netsh int tcp set supplemental Template=InternetCustom CongestionProvider=bbr2

And run the following command to confirm

Get-NetTCPSetting | Select SettingName, CongestionProvider

Use aria2c to download file

aria2c -x 16 -s 16 [url]
#          |    |
#          |    |
#          |    |
#          ---------> the number of connections here

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment