Upvote Upvoted 49 Downvote Downvoted
Shared home internet without lag and ping spikes
posted in Off Topic
1
#1
serveme.tf
0 Frags +

tl;dr Buy an Edgerouter ER-X and configure it using these instructions

The problem: lag and ping spikes

We're probably all familiar with the terrible lag you can get when your home internet connection is congested. It could be a house mate downloading with bittorrent, netflix, steam, automated device updates....
It doesn't have to be this way, and in this post I'll explain what you can do by fixing a thing called "bufferbloat".

Measuring bufferbloat

First of all, you'll want to get a quick idea of how bad your ping gets when your connection is congested. To get a rough idea, run the DSLReports speedtest. Please use an ethernet cable, if you're on wifi or a powerline adapter, you're gonna have a bad time.
The bufferbloat score is directly related to your lag during congestion. Anything worse than A+ or A means you'll lag badly if your connection is congested.
Regardless of how fast your connection is you can suffer from bufferbloat. I've seen fiber 500/500Mbit connections with over 500ms of bufferbloat.

Bufferbloat is the enemy, and using the tips below, I took my bufferbloat score from a C to an A+.

How to fix it

There are basically two ways to get these improvements, the first one easy and the second one a little harder, but they both involve traffic shaping and QoS.
1. Buy a $50 Edgemax ER-X router.
2. Flash a router to OpenWRT/LEDE (could be your current one, but you might lose WiFI depending on the chip used in the router)

So first of all, buying an ER-X router:
It's cheap, it's great and it comes with some tools baked in to fight bufferbloat. Battle(non)sense made a great video about how to configure a router like this. In the video he uses the slightly more expensive ER-L, but for our use case the ER-X is both cheaper and faster. The instructions are the same.
Once you've done this, you'll have the 2nd best method of fighting bufferbloat. For bonus points you can go over to the Edgemax forums and get your hands dirty to install the best method of fighting bufferbloat, it's called "cake", because it's a piece of cake to configure. Cake also has an extra neat feature where it will fairly divide the available bandwidth between the devices using the connection.

The second option is to flash a router to OpenWRT/LEDE:
This is a custom firmware for your router and it has the bufferbloat fixes included. You might even be able to flash your current router to this firmware, but depending on the wifi chip used in your router, wifi might not work or work worse after flashing, so beware. Flashing instructions vary between models, but for quite a few routers you can just load the custom firmware in the current web interface of your router, easy!

Limitations

1. Traffic shaping is reasonably tough on the CPU in a router, depending on your connection speed you might need a beefier router to handle the speed. Here are some rough numbers for what a given router can handle in traffic shaping speed (total speed up+down, so a 200Mbit down, 20Mbit up connection would need 220Mbit/sec)
Edgemax ER-Lite: 70Mbit/sec (170Mbit/sec with some hacks)
Edgemax ER-X: 180Mbit/sec (220Mbit/sec using "cake")
Linksys WRT1200AC: 500Mbit/sec
Linksys WRT1900AC: 700Mbit/sec

2. If your internet speed varies due to a crappy ISP, you'll need to update the traffic shaping speeds to compensate. My ISP is currently so congested that I can only count on 100Mbit instead of 200Mbit download during some evenings. So I need to change my settings to compensate for this.

3. Your traffic shaping router needs to be the only thing directly connected to the internet. So if you have cable/dsl modem with built-in wifi you need to disable or not use this wifi signal, as it will bypass the traffic shaping. All your traffic must flow through the traffic shaping router. If your cable/dsl modem supports "bridge" mode, use that.

4. To keep the bufferbloat under control, you give up about 5-10% of your internet speed. I get 190Mbit down and 38Mbit up with the fixes enabled vs 200/40 with the fixes disabled. But I gladly make this tradeoff for a much more responsive connection.

P.S.
My connection without any fixes: No prioritization of download, upload and pings, so bittorrent is just as important as gaming traffic. 100+ms higher ping during congestion.
My connection with Cake traffic shaping: Prioritization of traffic depending on the type, 5ms higher ping during congestion.

[b]tl;dr[/b] Buy an Edgerouter ER-X and configure it using [url=https://www.youtube.com/watch?v=KwHes-GWYuY]these instructions[/url]

[b]The problem: lag and ping spikes[/b]

We're probably all familiar with the terrible lag you can get when your home internet connection is congested. It could be a house mate downloading with bittorrent, netflix, steam, automated device updates....
It doesn't have to be this way, and in this post I'll explain what you can do by fixing a thing called "bufferbloat".

[b]Measuring bufferbloat[/b]

First of all, you'll want to get a quick idea of how bad your ping gets when your connection is congested. To get a rough idea, [url=http://www.dslreports.com/speedtest]run the DSLReports speedtest[/url]. [u]Please use an ethernet cable[/u], if you're on wifi or a powerline adapter, you're gonna have a bad time.
The bufferbloat score is directly related to your lag during congestion. Anything worse than A+ or A means you'll lag badly if your connection is congested.
Regardless of how fast your connection is you can suffer from bufferbloat. I've seen fiber 500/500Mbit connections with over 500ms of bufferbloat.

Bufferbloat is the enemy, and using the tips below, I took my bufferbloat score from a C to an A+.


[b]How to fix it[/b]

There are basically two ways to get these improvements, the first one easy and the second one a little harder, but they both involve traffic shaping and QoS.
1. Buy a $50 Edgemax ER-X router.
2. Flash a router to OpenWRT/LEDE (could be your current one, but you might lose WiFI depending on the chip used in the router)

So first of all, buying an ER-X router:
It's cheap, it's great and it comes with some tools baked in to fight bufferbloat. [url=https://www.youtube.com/watch?v=KwHes-GWYuY]Battle(non)sense made a great video about how to configure a router like this[/url]. In the video he uses the slightly more expensive ER-L, but for our use case the ER-X is both cheaper and faster. The instructions are the same.
Once you've done this, you'll have the 2nd best method of fighting bufferbloat. For bonus points you can [url=https://community.ubnt.com/t5/EdgeMAX/Cake-and-FQ-PIE-compiled-for-the-EdgeRouter-devices/td-p/1679844]go over to the Edgemax forums[/url] and get your hands dirty to install the best method of fighting bufferbloat, it's called "cake", because it's a piece of cake to configure. Cake also has an extra neat feature where it will fairly divide the available bandwidth between the devices using the connection.

The second option is to flash a router to OpenWRT/LEDE:
This is a custom firmware for your router and it has the bufferbloat fixes included. You might even be able to flash your current router to this firmware, but depending on the wifi chip used in your router, wifi might not work or work worse after flashing, so beware. Flashing instructions vary between models, but for quite a few routers you can just load the custom firmware in the current web interface of your router, easy!

[b]Limitations[/b]

1. Traffic shaping is reasonably tough on the CPU in a router, depending on your connection speed you might need a beefier router to handle the speed. Here are some rough numbers for what a given router can handle in traffic shaping speed (total speed up+down, so a 200Mbit down, 20Mbit up connection would need 220Mbit/sec)
Edgemax ER-Lite: 70Mbit/sec ([url=https://community.ubnt.com/t5/EdgeMAX/Qualcomm-Fast-Path-SFE-for-the-EdgeRouters/td-p/2041285]170Mbit/sec with some hacks[/url])
Edgemax ER-X: 180Mbit/sec ([url=https://community.ubnt.com/t5/EdgeMAX/Cake-and-FQ-PIE-compiled-for-the-EdgeRouter-devices/m-p/1706698#M132498]220Mbit/sec using "cake"[/url])
Linksys WRT1200AC: 500Mbit/sec
Linksys WRT1900AC: 700Mbit/sec

2. If your internet speed varies due to a crappy ISP, you'll need to update the traffic shaping speeds to compensate. My ISP is currently so congested that I can only count on 100Mbit instead of 200Mbit download during some evenings. So I need to change my settings to compensate for this.

3. Your traffic shaping router needs to be the only thing directly connected to the internet. So if you have cable/dsl modem with built-in wifi you need to disable or not use this wifi signal, as it will bypass the traffic shaping. All your traffic must flow through the traffic shaping router. If your cable/dsl modem supports "bridge" mode, use that.

4. To keep the bufferbloat under control, you give up about 5-10% of your internet speed. I get 190Mbit down and 38Mbit up with the fixes enabled vs 200/40 with the fixes disabled. But I gladly make this tradeoff for a much more responsive connection.

[b]P.S.[/b]
[url=https://i.imgur.com/B6mDemu.jpg]My connection without any fixes[/url]: No prioritization of download, upload and pings, so bittorrent is just as important as gaming traffic. 100+ms higher ping during congestion.
[url=https://i.imgur.com/QCgYIM2.jpg]My connection with Cake traffic shaping[/url]: Prioritization of traffic depending on the type, 5ms higher ping during congestion.
2
#2
5 Frags +

I have a TD-W8970 router flashed it with LEDE several months ago installed the SQM package. Using cake as the discipline and layer of cake as the setup script. It really is a god send. Before, when several people were watching youtube/netflix at the same my ping used to deviate like crazy but since flashing LEDE and setting up SQM i've had no problems whatsoever.

Depending on what router you have (if it is supported at all) the setup can be slightly more complicated than your average consumer router. I actually had to buy a special USB to Serial converter to initially flash the router.

If you have problems with ping deviation when your internet connection is under heavy load, this is something I'd highly recommend.

I have a TD-W8970 router flashed it with LEDE several months ago installed the SQM package. Using cake as the discipline and layer of cake as the setup script. It really is a god send. Before, when several people were watching youtube/netflix at the same my ping used to deviate like crazy but since flashing LEDE and setting up SQM i've had no problems whatsoever.

Depending on what router you have (if it is supported at all) the setup can be slightly more complicated than your average consumer router. I actually had to buy a special USB to Serial converter to initially flash the router.

If you have problems with ping deviation when your internet connection is under heavy load, this is something I'd highly recommend.
3
#3
4 Frags +

couldn't you just qos the shit out of the other hosts

couldn't you just qos the shit out of the other hosts
4
#4
serveme.tf
2 Frags +
NinjaDCI have a TD-W8970 router flashed it with LEDE several months ago installed the SQM package. Using cake as the discipline and layer of cake as the setup script.

Have you also added the following to the advanced egress/ingress options? (Might need a recent or custom build of LEDE).

diffserv4 nat triple-isolate

The first will deal with prioritization of the traffic, the second and third option will distribute bandwidth much more fairly between the different devices and destinations.

calxcouldn't you just qos the shit out of the other hosts

This accomplishes the same thing without all the extra configuration and without fixed limiting of the bandwidth for anyone.

[quote=NinjaDC]I have a TD-W8970 router flashed it with LEDE several months ago installed the SQM package. Using cake as the discipline and layer of cake as the setup script.[/quote]

Have you also added the following to the advanced egress/ingress options? (Might need a recent or custom build of LEDE).
[code]diffserv4 nat triple-isolate[/code]

The first will deal with prioritization of the traffic, the second and third option will distribute bandwidth much more fairly between the different devices and destinations.

[quote=calx]couldn't you just qos the shit out of the other hosts[/quote]
This accomplishes the same thing without all the extra configuration and without fixed limiting of the bandwidth for anyone.
5
#5
4 Frags +

can I turn an old computer into a router

can I turn an old computer into a router
6
#6
2 Frags +

My home computer wired through ethernet got an F so I'm pretty sad about that, could explain why I infrequently get ping spikes of over 1000 (but mostly around 600) when I play OW and my ISP had nothing to offer as explanation

My home computer wired through ethernet got an F so I'm pretty sad about that, could explain why I infrequently get ping spikes of over 1000 (but mostly around 600) when I play OW and my ISP had nothing to offer as explanation
7
#7
2 Frags +
panda106can I turn an old computer into a router

Yes, if you wanna know how you'll have to read the manga

[quote=panda106]can I turn an old computer into a router[/quote]

Yes, if you wanna know how you'll have to read the manga
8
#8
6 Frags +

a quick tip for anyone on shaw internet in canada: your ping spikes probably aren't from other people using the internet, but because your wireless modem sucks

(better list of modem/routers affected here)

it's a bug that hits anything with intel's puma 6 chipset, it still happens in bridged mode, even after any firmware updates attempting to fix it, and once you get to the high-end plans, shaw forces you to choose solely between modems that have this problem

shaw is a plague

a quick tip for anyone on shaw internet in canada: your ping spikes probably aren't from other people using the internet, but because [url=https://www.bleepingcomputer.com/news/hardware/lawsuit-brewing-over-unfixed-bug-in-intel-puma-6-cpus/]your wireless modem sucks[/url]

([url=https://www.dslreports.com/testsearch?fy=1999&q=puma6&typ=hardware&ty=2016&p=1]better list of modem/routers affected here[/url])

it's a bug that hits anything with intel's puma 6 chipset, it still happens in bridged mode, even after any firmware updates attempting to fix it, and once you get to the high-end plans, shaw forces you to choose solely between modems that have this problem

shaw is a plague
9
#9
serveme.tf
5 Frags +
trash
...

it's a bug that hits anything with intel's puma 6 chipset, it still happens in bridged mode, even after any firmware updates attempting to fix it

...

So many cable modems with that piece of crap inside unfortunately, a list: http://badmodems.com/Forum/app.php/badmodems

And yeah, nothing can save you if you use one of those :(

[quote=trash]

...

it's a bug that hits anything with intel's puma 6 chipset, it still happens in bridged mode, even after any firmware updates attempting to fix it

...
[/quote]

So many cable modems with that piece of crap inside unfortunately, a list: http://badmodems.com/Forum/app.php/badmodems

And yeah, nothing can save you if you use one of those :(
10
#10
4 Frags +

ur a god ty

ur a god ty
11
#11
5 Frags +

isn't there any easy way to fuck the others so i get better connection?

isn't there any easy way to fuck the others so i get better connection?
12
#12
1 Frags +

If you have Linux, you might want to use cake or fq_codel on your PC to have better traffic shaping at the OS level as well.

If you have Linux, you might want to use [url=https://www.bufferbloat.net/projects/codel/wiki/Cake/#installing-cake-out-of-tree-on-linux]cake[/url] or [url=https://www.bufferbloat.net/projects/codel/wiki/#binary-code-and-kernels-for-linux-based-operating-systems]fq_codel[/url] on your PC to have better traffic shaping at the OS level as well.
13
#13
2 Frags +
panda106can I turn an old computer into a router

I too would want to learn how to do this. I have a decade old laptop just sitting around collecting dust.

[quote=panda106]can I turn an old computer into a router[/quote]
I too would want to learn how to do this. I have a decade old laptop just sitting around collecting dust.
14
#14
serveme.tf
1 Frags +
GrinReaperpanda106can I turn an old computer into a routerI too would want to learn how to do this. I have a decade old laptop just sitting around collecting dust.

Try IPFire. You'll need two networking interfaces.

[quote=GrinReaper][quote=panda106]can I turn an old computer into a router[/quote]
I too would want to learn how to do this. I have a decade old laptop just sitting around collecting dust.[/quote]

Try [url=https://www.ipfire.org/]IPFire[/url]. You'll need two networking interfaces.
15
#15
1 Frags +

Would I be correct in saying that the ER-X doesn't have a built in modem or WiFi, so I would have to buy a modem and some kind of WiFi transmitter as well?

Would I be correct in saying that the ER-X doesn't have a built in modem or WiFi, so I would have to buy a modem and some kind of WiFi transmitter as well?
16
#16
serveme.tf
1 Frags +
FreudWould I be correct in saying that the ER-X doesn't have a built in modem or WiFi, so I would have to buy a modem and some kind of WiFi transmitter as well?

Correct. Or you could buy a wifi router that's flashable to LEDE like the TP-Link Archer C7. You'll still need a modem though.

[quote=Freud]Would I be correct in saying that the ER-X doesn't have a built in modem or WiFi, so I would have to buy a modem and some kind of WiFi transmitter as well?[/quote]

Correct. Or you could buy a wifi router that's flashable to LEDE like the TP-Link Archer C7. You'll still need a modem though.
17
#17
1 Frags +
ArieCorrect. Or you could buy a wifi router that's flashable to LEDE like thee TP-Link Archer C7. You'll still need a modem though.

Would you recommend any particular modem? Connection is about 15 Mb/s down, 0.6 Mb/s up; ISP is Sky.

Sorry for sidetracking thread, am pretty clueless about this stuff.

[quote=Arie]Correct. Or you could buy a wifi router that's flashable to LEDE like thee TP-Link Archer C7. You'll still need a modem though.[/quote]

Would you recommend any particular modem? Connection is about 15 Mb/s down, 0.6 Mb/s up; ISP is Sky.

Sorry for sidetracking thread, am pretty clueless about this stuff.
18
#18
Spaceship Servers
0 Frags +

has anyone used DD-WRT and gotten QoS to actually work on it? I've tried multiple different routers and QoS never properly works on any of them and im still left with shitty congestion and spikes

has anyone used DD-WRT and gotten QoS to actually work on it? I've tried multiple different routers and QoS never properly works on any of them and im still left with shitty congestion and spikes
19
#19
serveme.tf
1 Frags +
stephhas anyone used DD-WRT and gotten QoS to actually work on it? I've tried multiple different routers and QoS never properly works on any of them and im still left with shitty congestion and spikes

A recent version of DD-WRT should work, configure the QoS according to this guide (HTB + fq_codel) https://www.dd-wrt.com/wiki/index.php/Quality_of_Service and make sure you set the down and up bandwidth of your connection correctly.

But if you can run DD-WRT, you can probably run LEDE as well and get cake QoS instead.

[quote=steph]has anyone used DD-WRT and gotten QoS to actually work on it? I've tried multiple different routers and QoS never properly works on any of them and im still left with shitty congestion and spikes[/quote]

A recent version of DD-WRT should work, configure the QoS according to this guide (HTB + fq_codel) https://www.dd-wrt.com/wiki/index.php/Quality_of_Service and make sure you set the down and up bandwidth of your connection correctly.

But if you can run DD-WRT, you can probably run LEDE as well and get cake QoS instead.
20
#20
1 Frags +

Will buying a router help if our connections all look like this constantly? I know nothing about networks

this is with only 2 computers (nothing on wifi) connected to a superhub 2

Will buying a router help if our connections all look like [url=https://cdn.discordapp.com/attachments/340884609455751169/379410061312786433/unknown.png]this[/url] constantly? I know nothing about networks

this is with only 2 computers (nothing on wifi) connected to a superhub 2
21
#21
serveme.tf
1 Frags +
MouldWill buying a router help if our connections all look like this constantly? I know nothing about networks

this is with only 2 computers (nothing on wifi) connected to a superhub 2

If that's a graph of an idle connection, no, it will not help. If that's a graph of your connection while someone is downloading/uploading, yes, it might help.
If your connection always looks like this you might have a problem in your local setup or live in a very congested neighborhood with too many people on cable.
Don't upgrade to the superhub 3, it has the awful puma 6 chip inside

[quote=Mould]Will buying a router help if our connections all look like [url=https://cdn.discordapp.com/attachments/340884609455751169/379410061312786433/unknown.png]this[/url] constantly? I know nothing about networks

this is with only 2 computers (nothing on wifi) connected to a superhub 2[/quote]

If that's a graph of an idle connection, no, it will not help. If that's a graph of your connection while someone is downloading/uploading, yes, it might help.
If your connection always looks like this you might have a problem in your local setup or live in a very congested neighborhood with too many people on cable.
[url=http://community.virginmedia.com/t5/Gaming-Support/Hub-3-Compal-CH7465-LG-TG2492LG-and-CGNV4-Latency-Cause/td-p/3271492/page/227]Don't upgrade to the superhub 3, it has the awful puma 6 chip inside[/url]
Please sign in through STEAM to post a comment.