Husband. Father. Software engineer. Ubuntu Linux user.
Have you ever noticed your internet connection get slower when uploading a large file? I have, but I never put too much thought into it or realized I could do anything about it… Until I stumbled upon this blog post from a systems engineer at Ookla (the company behind speedtest.net). As it turns out, there’s a term for this (bufferbloat), and this is an easily solvable problem.
As Brennen explains in his blog, bufferbloat is a problem that occurs when a router’s buffers fill up due to a slow connection (like the slower upload connection most ISPs provide). The rate of data going into the router is faster than the rate of data going out, the buffers get full, and the whole thing slows down. The solution is pretty simple - just send data in a little slower than the fastest rate it can leave.
After stumbling across Brennen’s blog, I wanted to check if my own internet connection was affected by this problem. As it turns out, this is easy to test:
ping google.com
and leave it running.If your response times go up during the upload, it’s bufferbloat! In my own results, I saw a roughly 2,650% increase (\( \frac{330 - 12}{12} \)) in ping response time during upload.
Brennen details how he fixed bufferbloat on his network, but I wanted to solve the problem without shelling out for an expensive router if I could. Luckily, I was already using a Linksys E900 wireless router with DD-WRT installed. DD-WRT supports some basic QoS settings, so I went into the admin panel and set up QoS to limit my WAN uploads to 4,720 kbps, or roughly 80% of what speedtest.net says my max upload speed is.
After applying the QoS settings, I ran the ping test again and my results were unaffected by the upload. Success! I checked the download speeds to, just to confirm my settings changes did not make them significantly worse.
So that’s it. A simple rate limit on my router fixed the problem. My upload rate might be marginally slower due to my own artificial limit, but my download speed will not be impacted. That is, I can continue browsing the internet with normal, fast speeds even while uploading a large file. That’s a trade-off I’m happy to make.
👋 Hi, I'm Mike! I'm a husband, I'm a father, and I'm a senior software engineer at Strava. I use Ubuntu Linux daily at work and at home. And I enjoy writing about Linux, open source, programming, 3D printing, tech, and other random topics. I'd love to have you follow me on X or LinkedIn to show your support and see when I write new content!
I run this blog in my spare time. There's no need to pay to access any of the content on this site, but if you find my content useful and would like to show your support, buying me a coffee is a small gesture to let me know what you like and encourage me to write more great content!
You can also support me by visiting LinuxLaptopPrices.com, a website I run as a side project.