Hacker News new | ask | show | jobs
by Arie 2910 days ago
An awful lot of home broadband connections suffer from bufferbloat and even for the ones that don't, a single host can easily hog all the bandwidth. If you're used to getting lag in your VoIP or gaming when a house mate starts a stream/download/torrent, this can be fixed :)

The cake traffic shaper in OpenWRT is amazing for fighting bufferbloat in your home network and it can also do almost perfect fairness in dividing the available bandwidth per LAN host with very little configuration. Just get it as part of the SQM tools in OpenWRT and enable it. For the per-host-fairness take a look at the "Make cake sing and dance" from this link: https://openwrt.org/docs/guide-user/network/traffic-shaping/...

If you use an Edgerouter, you can get the cake traffic shaper but you'll have to do without the easy web interface OpenWRT has: https://community.ubnt.com/t5/EdgeRouter/Cake-and-FQ-PIE-com...

5 comments

Parents live in a smaller town with two awful ISP selections. They had a bunch of WiFi devices on an ISP router and the connection quality and latency was just terrible when more than one device was in use and any bandwidth intensive services were being used. (Low quality Netflix is intensive on small-town monopoly internet.)

I purchased them a Netgear R7800 and installed hnyman's LEDE build [1] to enable SQM. Night and day difference in latency response. No more staring at a white screen for 3 seconds per URL click.

The build has been stable for several months. I wouldn't recommend this for non-technical users or anyone not willing to spend time troubleshooting, but it has been a great improvement. I couldn't find any other device capable of doing this without running x86 hardware or something else silly.

A few other people mention it, but yes, this is only going to work on slower connections on current SOHO hardware. I think the R7800 can do software SQM at up to 150mbps or so. Plus, if you have a gigabit symmetric connection, hopefully you aren't having bufferbloat issues.

Just wish a popular manufacturer would release an easy-to-use router with SQM so I could install it for non-technical users and forget. Ubiquiti is somewhat close to that, but I believe their prosumer hardware (USG) is running a slow processor at the moment and doesn't even support SQM without installing custom kernels.

[1] https://forum.lede-project.org/t/build-for-netgear-r7800/316

>I couldn't find any other device capable of doing this without running x86 hardware or something else silly.

Was the internet speed so high that you couldn't use a normal supported router like a TP-Link Archer C7 at half the cost? I need to do more testing but it seems my C7 can handle my 100/100Mbps fiber connection doing SQM without too much issue.

I haven't seen a router under $400 that can do fair queueing in hardware faster than ~200 megabits. If you have fiber it's cheaper to setup a beefy Linux box and run PFSense on it. Hardware offload is usually disabled when you turn on QoS so doing slow will often slow down gigabit LAN links as well
This seems like a potential sweet spot for the Espressobin [1] with pfsense but the pfsense folks have not released their ARM version, only demonstrated it [2], perhaps they're just too dang busy or perhaps it would cut into the margins of their x86 solutions. Regardless it would make a nice appliance if they ever do release a PFsense ARM image.

[1]http://espressobin.net/

[2] https://gist.github.com/gonzopancho/760ab9ecee9dfbc1b6033e48...

PFSense is great if your okay with pulling out a monitor and keyboard every time there is a config issue or interface change. Do not bring in any interfaces over USB if you like to preserve your sanity and want to use PFSense.

These days I just run OpenWRT on x86, no more will my router sit in a broken state that I can't fix by logging in over the LAN or WAN (via OpenVPN ofc). Wish PFSense would get sane defaults in this regard!

I'm at 100/100 though, so wouldn't something simpler be enough? The wired side of the router is gigabit but that's just an integrated gigabit switch, it doesn't even touch any CPU. I'll be doing more testing to make sure but my ISP doesn't seem to have too bad a buffer bloat anyway.
Sometimes turning on QoS disables offload on all ports including lan. Try a download test between local machines
My understanding of these routers is that the gigabit switch is independent from the router. They're physically on the same board but the router is just another machine on the switch. If the switch table says portA->portB it doesn't matter what the router on portC has decided to offload or not.

Edit: Maybe you mean Wifi to wired may have a disabled offload? That path does go through the router and not directly through the switch. For bigger installations I end up having one of these with wifi disabled as the router (firewall, dhcp, etc) and individual ones connected through ethernet as dumb access points (same SSID on all and straight bridge from Wifi to Ethernet). That should also avoid any issues and is a good setup to get more wifi coverage with a simple config.

Just read the r7800 had the best range for an all-in-one unit. Not sure if it's true, but it has been an amazing router. I picked one up for myself -- they are 130$ refurbished on Amazon every now and then.

To answer your question: I have no idea. Would be neat if a much cheaper model had the horsepower though.

Sounds like a good recommendation. The C7 has been my go-to for cheap, good wifi, and solid LEDE support. But I haven't stress tested it to check how it will take a very congested network. My uses have had fairly light users.
The Archer C7 seems to do about 400Mbps with no configuration/optimization when running OpenWRT, plus with them being available for $20 to $30 on Craigslist and their knockoffs (Offerup & Letgo), its easy to nab one for cheap.

I hear hardware offload is possible, but I have yet to try a build that has the patches for it.

With Gigabit fiber internet I can see needing something more. I find 100Mb internet to be enough for my needs and the Wifi performance to be adequate to the NAS on the LAN. So I even prefer that there's no offload to hardware and that it's the well tested Linux kernel code doing the heavy lifting.
I've found that I only need to shape upload and I get almost all the bufferbloat benefits, while reducing CPU requirements because download is not shaped. Thus, a $15 router with a slow CPU can be fine for fixing bufferbloat.
Thanks for the Edgerouter link, saved me doing some Googling - Off to got and apply this now and see what difference this makes to the Bufferbloat tests.

As Arie mentions, this is a little more involved on the EdgeOS stuff, but doesn't look too complex for those that are used to a CLI or two.

Edit: Entirely off-topic, but an equally interesting find – There is a WireGuard client for the EdgeRouter line: https://community.ubnt.com/t5/EdgeRouter/Release-WireGuard-f...

Ah crap, I wonder if I've done the wrong thing going with a switch + Security Gateway instead of an EdgeRouter.
You get integration with the Unifi UI and a much easier configuration experience, you lose only because what you've got is (probably) overkill for residential use. If you've got more than one AP then you start to win again because you can power all your APs from the switch.

If you were happy with your setup before hearing about the EdgeRouter, I hope you'll still be happy with it now :).

It looks like I'll be fine with the US-8-60W and the USG until I get an Internet (downstream) speed of > 100 megabits, which, in Australia, is not likely to happen for a long time.

I'd hope I'd have upgraded my LAN to at least 2.5 gigabit by then, anyway.

There's one downside - if you've got a fast connection, anything less than a top-of-the-range router with dual or quad core highly clocked CPU's are going to struggle to shape that much traffic.
I just got an edgerouter-x how does this compare to just using smart queue? dslreports gives me an A+ for bufferbloat.
Smart queue (fq_codel + htb) does not do per-host fairness, only per flow fairness. So a single host on the LAN can still hog all the bandwidth.
Great links. I've been using cake for a while but without the advanced options.

One random question: Does it ever make sense to add SQM to a tap_soft interface? I have two locations and both have SQM set up to minimize bufferbloat, but when I VPN from one to the other there is some bufferbloat on the VPN connection.

if the vpn terminates on the routers... fq_codel now (I cannot remember the kernel version, sorry) can preserve the inner hash of the vpn traffic and manage the flows before they hit the tunnel. This is mostly an ipsec, not openvpn, sort of thing.