AB9IL.net: Linux Broadband Speed Tweaks

Written and curated by Philip Collier / AB9IL
HOME Software Defined Radio WiFi Antennas Air and Space Radio Linux or Windows Digital Audio Liberation Tech Video Gallery Photo Gallery

Live Internet SDR List Radio Caroline BBC Radio 4 LW

Censorship's Grave
How autocrats lost the fight to block your internet.

We earn a commission if you make a purchase, at no additional cost to you.

In most instances, modern Linux distributions come with internal settings that provide good and stable internet connectivity. For the average user who browses websites and sometimes watches streaming video or listens to podcasts, the performance may be satisfactory. For the power users out there, who may have large file transfers running along with streaming media, the default settings of many Linux distributions don't allow wide enough bandwidth for smooth operation.

A few adjustments to the system can considerably increase the Linux system's upload and download speeds. In contrast to Windows, where several files and registry locations must be edited, a modern Linux system (with a 2.6.17 or newer kernel) needs settings specified in only one file. Specifically, the file is /etc/sysctl.conf and the following settings may be pasted by a user with root priveleges:

#Optimise TCP settings
net.ipv4.tcp_rmem=4096 39000 187000
net.ipv4.tcp_wmem=4096 39000 187000
net.ipv4.tcp_mem=187000 187000 187000

What is the purpose of changing these networking settings? Here's what they do:

Disable timestamps as defined in RFC1323: by setting net.ipv4.tcp_timestamps to 0.
Enable select acknowledgments by setting net.ipv4.tcp_sack to 1.
Set minimum size, initial size, and maximum size in bytes for tcp_rmem and tcp_wmem to 4096, 39000, and 187000.
Set minimum size, initial size, and maximum size in bytes for tcp_mem to187000 187000 187000.
Prevent TCP from caching metrics on closing connections by setting net.ipv4.tcp_no_metrics_save to 1.
Enable automatic adjustment of the memory buffers by setting net.ipv4.tcp_moderate_rcvbuf to 1.

Not much else needs adjustment! For extreme cases, the settings can be tweaked further, but such fine tuning is more for large data transfers over specific paths, and not something a power user needs for connections do multiple web sites around the world. Also, the developers for the top Linux distributions work hard to keep things updated as hardware and software advance, reducing the need for major changes in userland. Use the settings given above, and enjoy connectivity well above average speeds!

© 2005 - 2024 AB9IL.net, All Rights Reserved.
About Philip Collier / AB9IL, Commentaries and Op-Eds, Contact, Privacy Policy and Affiliate Disclosure, XML Sitemap.

This website is reader-supported. As an Amazon affiliate, I earn from qualifying purchases.