Dealing with a slow, shared internet connection
Or how I (almost) entirely got rid of lag spikes
In a perfect world, everyone would have access to affordable high speed internet. Unfortunately the world isn't perfect and while a slow connection is definitely a first world problem, it's something many, especially gamers, know well. In this post I'll detail my solution for a ~5/0.8 ADSL2+ connection shared amongst 5 heavy users.
Why not just get faster internet?
This is the obvious solution and depending on how good the infrastructure is in your country, may be the answer. But I live in Australia, where ADSL is still not only the predominant connection type but often the only option. Cable is available to ~30% of premises (which does not include my own) in a seemingly random distribution and even that only fixes download speeds, uploads are a maximum of ~2Mbit. NBN, in it's mixed technology mess glory is "coming soon" but my area isn't slated for an upgrade to VDSL until late 2019 even if by some miracle it sticks to schedule.
Any other option in my scenario is unfeasibly expensive, with affordable wireless options not much faster if at all compared to ADSL.
Getting the most out of what you have
Assuming a faster technology isn't available, the place to start is getting as much as possible from what there is.
In my case that means pulling every last kb/s from ADSL. First off, setting the fastest (stable, you don't want dropouts) sync profile on the ISP side will likely get the biggest gain. Some will let you do this online, others require a call to tech support who hopefully know what you're talking about. This is the only step that won't require additional hardware either.
With the fastest profile set on the ISP side, it's time to start making changes on our end. This step requires a modem with the ability to change the target Signal to Noise ratio (SNR), I personally use a Billion for my Optus connection. Not every modem supports this, so Google is your friend for your specific model. The goal again as with profiles is the fastest stable connection. In my case I was able to set the lowest option on my modem and still achieve a stable connection, gaining approximately 1Mbit downstream speeds in the process compared to the default.
Examine the situation again
At this point we have the fastest possible speeds we can get, for me that was ~6.5/0.8. Not amazing, but comfortable enough for one or maybe two to watch HD streaming video, play online games etc. But it's not one or two people using this connection, it's 5. When everyone is going about their usage, things are very rough, especially for gaming or VoIP where latency shoots up to multiple seconds at times.
The closest thing to magic in a black box
Now, nothing is going to magically add bandwidth. But how what there is to go around is sliced up matters. Enter what is essentially the hero of our story, the Ubiquiti Networks EdgeRouter X.
What does our little friend do? It allows us to apply an algorthim called fq_codel, which tries (and largely succeeds) to fairly distribute traffic while making sure that nothing is ever delayed too much.
Not only that, but the other Quality of Service (QoS) options available on the EdgeRouter X allow for limiting of specific devices and traffic types. For instance, Netflix on a smart TV never needs more than a couple of megabits to function well enough, so we can limit streaming video for that individual device to 2Mbit.
With some relatively straightforward configuration, we can tune the network to best fit our needs.
Now, the EdgeRouter X is far from the only product to have these features. However it is one of the cheapest at $50US, especially among devices that support all this on their official firmware.
Results
So after all this effort, was it worth it? Well after using the EdgeRouter for almost 2 months now and having fine tuned my configuration, I'm very happy. Ping spikes in games have been essentially eliminated, regardless of what else is happening on the network. VoIP is much more consistent as well. But it's not just realtime applications that benefit, even general browsing is more responsive thanks to the lower latency. Bandwidth is also split fairly amongst devices instead of any single user hogging the connection, greatly aiding streaming video.
Yes, this is a lot more work and expense than plugging in the modem-router combo box your ISP gave you. But it makes using a 2005 connection in 2017 not only a much better experience, but a usable one at all if you play online games.