Why gaming on a DSL line is terrible and the math says there’s nothing you can do about it

2020 December 5
by Daniel Lakeland

TL;DR even with *perfect* queue control on your router, if you have less than about 3Mbps upload you will NEVER get competitive game play on CoD or similar games, and it will get worse and worse the slower your upload, and there is nothing your router can do about it.

I like to help people with their interactive internet issues: online gaming, video conferences, VOIP phone calls, etc. There are multiple long threads on forum.openwrt.org involving me and a few others such as moeller0 (Sebastian Moeller) teaching people how queues work and how to configure their routers to implement queue control either with the great “plug and play” SQM package on OpenWrt, or with more customized queue systems for people who want stricter prioritization on games.

The great work done by the Cake developers, such as Dave Taht and his ragtag band of internet warriors makes this fairly plug-and-play when you have proper broadband connections. Unfortunately even the crazy “good” broadband most people have is often highly asymmetric and focuses on very high download speeds, at the expense of futzing up your video chats etc due to insufficient upload speed.

So let’s get to the hardest pain-point of the internet: gaming on a low end DSL line. For example I’ll imagine like one person I’ve tried to help that you’re playing Call Of Duty Black Ops – Cold War which is an interactive shooting game and you have a DSL line that is 15000 kbps download and 850kbps upload. Notice that huge asymmetry.

Now, based on packet captures, we know that this game like many others operates on more or less a 64Hz network tick rate, meaning it sends a game packet every 1/64 = 0.0156 seconds or 15.6 ms. Maybe it’s closer to 1/60, but it doesn’t matter because we don’t need super precision to get the idea here.

2020-11-27 (1)

Here is the actual bandwidth usage, in Bytes per second, which shows the client on PS4 sends 18000 bytes/s which is 144kbps… and the server sends about 30000 bytes/s with occasional peaks up to say 40000, or 320kbps. If the sending rate is 64 packets per second, then each packet from the server is about 625 bytes.

2020-11-27

Now. Let’s imagine you have two things going on at the same time in your network. First, you are playing your game, and you have somehow managed to ensure that your game packets *always have strict priority*. So as soon as a game packet is received at your router, it is sent, and other packets will wait in line. But the other thing that’s going on is that someone is uploading their latest pictures to Google Photos or something like that, where the point is to send a bunch of data, but latency is totally unimportant. The process will take a minute or two, so delays of 100ms while totally unacceptable for your game are completely unnoticeable to your photos upload.

Let’s look at the worst case: Your router receives a photo upload packet which by the convention for packets on the internet is around 1500 bytes, and at the moment it has no other packets to send and there has been sufficient time since the last packet that the router’s shaper software determines it’s ok to send this packet… so it sends the 1500 byte packet to the DSL modem.

Immediately after that a CoD game packet arrives, and because it’s strict priority it gets sent.

Now, the DSL modem has two packets in line in a FIFO… the first one is 1500 bytes, and the second one is about 600. The first one has 1500*8 bits to send, and your upload speed is 850 kbps or 850 bits/ms, which means 1500*8/850 = 14.1 ms… Now lets look at the game tick rate: 1/64 of a second = 15.6ms. Which means that *even a single packet ahead of you* in the modem delays your game packet by 14.1/15.6 = 90% of the tick time. In other words, this packet is almost as good as a packet drop. In fact, if there are any packets other than your game going over your DSL upload you will experience jitter exceeding your inter-packet tick rate on a routine basis just because that’s what’s inevitably going to happen.

How can you fix this? The first thing is to increase your upload speed. Suppose you want that a single packet upload time takes at most 1/3 of the inter-arrival time between ticks… That means you should be able to send 1500*8 bytes every (1/3 * 1/64 seconds), so your bandwidth should be 2.3 Mbps at the very minimum. Below about 2.3 Mbps even very good packet controls will inevitably result in packet delays that are a significant fraction of the inter-packet arrival time for your game. To get very good response, you want to be well above this 2.3 Mbps rate. So let’s say above 3 Mbps is where you can reliably schedule packets in a queuing system and not have trouble squeaking your game packets in between other packets on the network.

If you don’t have 3Mbps then your only chance to play competitive level online games is to get yourself a SECOND DSL line and dedicate it to your gaming machines. If you do have 3Mbps then high quality queuing disciplines such as cake using layer_cake diffserv4, or HFSC with custom queue designs, or other mechanisms that shape and prioritize packet flows can work well. Below 3Mbps you will get progressively worse game play or voip or video chats EVEN WITH good queue control systems.

Let’s look at the next pain point, the speed below which two packets in a queue will equal to your interarrival time: 2*1500*8/(1/64) = 1.5Mbps. Below 1.5Mbps if you ever get two bulk packets ahead of you, your game packet is as good as dropped even if it gets sent… Finally let’s see where 1 packet ahead of you is as good as a drop… it’s 1500*8/(1/64) = 768kbps. Do NOT try to game competitively on a DSL line with less than 768kbps upload. In fact, don’t try to game on a DSL line with less than 1.5Mbps upload because then only 2 packets ahead of you is as good as a drop and 1 packet ahead of you is a 50% delay in your packet…

If you actually make money in e-sports for example you should be gaming on a line with a minimum of 10Mbps up and download, or a line with at least 1.5Mbps upload that is 100% dedicated to gaming.

If you care enough, and you have the cash to pay, OpenWrt with Mwan3 package can let you connect two DSL modems and send all your gaming machine traffic over one line and the general web browsing stuff over the other line. Combine it with cake on the appropriate interfaces and you’ll be all set to play competitively even down to 800kbps or maybe a little below.

Comments are closed.