What's new

Tuning and optimizing for low latency?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

gamer4life

New Around Here
As a gamer, I play multiplayer games a lot and well lag caused by high latency is the buzz killer. So with that in mind, how can I lower my latency?


My setup is a Asus Dark Knight RT-N66U with Merlin. I tend to game mostly on my Xbox One that is connected via LAN/wired. I have tried to shut off services, I don't use and noted the steps here:

WPS
- Wireless->WPS->Disable
STP (if you have one more switch other than router, leave it enabled)
- Lan->Switch Control->Spanning-Tree Protocol->Disable
ipv6
-IPv6->Auto Configuration Setting->Enable Router Advertisement->Disable
-IPv6->Auto Configuration Setting->Enable DHCPv6 Server->Disable

USB Application->Media Server->Enable DLNA Media Server->Off
USB Application->Network Place/Samba Share->Disable Share
USB Application->Miscellaneous Setting->Force as Master Browser->Disable
USB Application->Miscellaneous Setting->Set as WINS Server->Disable
USB Application->3G/4G->Enable USB Modem->Disable

Is there anything else I can do?

I would really appreciate some help.

Note, I will post a separate thread on the QoS/traffic management since it is slightly unrelated overall.
 
Some thoughts... and these are more general than just AsusWRT-Merlin...

1) Disabling WPS is always a good idea - all the cool kids do this

2) WPA2-AES is your friend, don't use WPA2-Mixed (long story about WMM, 11n/11ac, and frame bursting)

3) IPv6 options - leave them on if your ISP supports IPv6, prevents the dreaded/nasty NAT issues we see with IPv4...

4) Disable USB Filesharing/Media Server stuff... along with other "value adds" like DPi/VPN/blah...

5) Spanning Tree Protocol - not really an issue unless you have other routers or managed switches on your LAN - in any event, I would leave this on - doesn't hurt on a simple LAN, and on a complex LAN, turning STP off can break things...

6) If you must WiFi for your gaming - keep the AP in B/G/N mixed (for 2.4G) or A/N/AC for 5GHz... 11n Greenfield only mode can actually impact performance if there are even a single legacy client/AP out there...

7) 2.4GHz - narrow channels only, not Wide or 20/40 auto - 20/40 auto adds latency as the AP checks to see, and 40MHz only can be impacted by adjacent AP's that overlap the secondary channel - all the cool kids use 20MHz in 2.4GHz

8) Disable TurboQAM in 2.4GHz - again, it's latency and clients can be pretty odd with Turbo...

9) Disable beamforming for 2.4GHz - 11n TxBF, if used for explicit or implicit, limits the AP/Client to single stream only

10) MU-MIMO/Beamforming in 5GHz - something to consider to disable, as MU and TxBF do take additional time, better to be SU-MIMO and let SM carry the bandwidth...
 
I would also add a couple of more...

11) disable Guest SSID - adds more time on the WiFi channels, and the AP needs to think about whether or not to allow access

12) QoS/Traffic Shaping/Client Prioritization - depends on the Router software, but consider that the CPU needs to decide what to do.. and even on the higher end (e.g. since this is an Asus forum, the RT-AC3200/AC68U and their newer items like the AC5300/88U/3100's)... this can put additional load on the CPU, and this translates into more latency...

Router/AP's in the consumer space have all the computing horsepower of a low-end smartphone, e.g. Dual Core ARM Cortex-A9... to put things into perspective, iPhone 4S/Samsung Galaxy S3...

So the key thing is turning off the crap you don't need, and you'll get better performance...
 
8) Disable TurboQAM in 2.4GHz - again, it's latency and clients can be pretty odd with Turbo...

This is especially important with PS4/XBone, as they are Marvell-based clients, and there's interop issues with Marvell and Broadcom on the non-standard VHT modes in 2.4GHz... so set the AP to B/G/N, and disable Turbo (some OEM's have different names for this)
 
I seemed to have a few weird issues with lag when gaming even though I had a good ping. What I did was finally disable the firewall on the router while keeping my software firewall on. I'm still experimenting to find the cause but I suspect it may have been an issue. I hesitate to recommend turning it off but if you have another firewall solution, it may help with performance.
 
Some thoughts... and these are more general than just AsusWRT-Merlin...

1) Disabling WPS is always a good idea - all the cool kids do this

2) WPA2-AES is your friend, don't use WPA2-Mixed (long story about WMM, 11n/11ac, and frame bursting)

3) IPv6 options - leave them on if your ISP supports IPv6, prevents the dreaded/nasty NAT issues we see with IPv4...

4) Disable USB Filesharing/Media Server stuff... along with other "value adds" like DPi/VPN/blah...

5) Spanning Tree Protocol - not really an issue unless you have other routers or managed switches on your LAN - in any event, I would leave this on - doesn't hurt on a simple LAN, and on a complex LAN, turning STP off can break things...

6) If you must WiFi for your gaming - keep the AP in B/G/N mixed (for 2.4G) or A/N/AC for 5GHz... 11n Greenfield only mode can actually impact performance if there are even a single legacy client/AP out there...

7) 2.4GHz - narrow channels only, not Wide or 20/40 auto - 20/40 auto adds latency as the AP checks to see, and 40MHz only can be impacted by adjacent AP's that overlap the secondary channel - all the cool kids use 20MHz in 2.4GHz

8) Disable TurboQAM in 2.4GHz - again, it's latency and clients can be pretty odd with Turbo...

9) Disable beamforming for 2.4GHz - 11n TxBF, if used for explicit or implicit, limits the AP/Client to single stream only

10) MU-MIMO/Beamforming in 5GHz - something to consider to disable, as MU and TxBF do take additional time, better to be SU-MIMO and let SM carry the bandwidth...

I don't do Wifi for my gaming, but will keep those steps (7+) in mind for when I do. Is there any reason to do those if you use LAN for gaming?

I'm also having issues with when a family member turns on Netflix, my ping spikes to 200-400ms. Any way to minimize this or prioritize my gaming traffic?

Our internet is 25Mbps down, and measured to be around 4 Mbps up so it should have enough bandwidth....

I seemed to have a few weird issues with lag when gaming even though I had a good ping. What I did was finally disable the firewall on the router while keeping my software firewall on. I'm still experimenting to find the cause but I suspect it may have been an issue. I hesitate to recommend turning it off but if you have another firewall solution, it may help with performance.

What was the weird issues you had?
 
I don't do Wifi for my gaming, but will keep those steps (7+) in mind for when I do. Is there any reason to do those if you use LAN for gaming?

I'm also having issues with when a family member turns on Netflix, my ping spikes to 200-400ms. Any way to minimize this or prioritize my gaming traffic?

Our internet is 25Mbps down, and measured to be around 4 Mbps up so it should have enough bandwidth....

Most of the tips I shared are for WiFi, as some folks don't have the option to run an ethernet cable (esp. consoles)...

Quick tip on the Netflix - log into the account on the Web Page, and change the bandwidth there to 300 Mbps (the lowest setting) - most folks won't know the difference ;)
 

Attachments

  • netflix_bandwidth.png
    netflix_bandwidth.png
    134.1 KB · Views: 1,151
What was the weird issues you had?

Playing Battlefield 4 or Quake Live, I'd get a stuttering freeze, like I was lagging out but ping was good >50ms usually. It seemed to happen more when I updated to the recent Merlin release but still did it some on John's latest. I haven't had the issue yet but it seems sporadic which makes it hard to diagnose. I just did a Windows reinstall so I might turn it back on to see.
 
I seemed to have a few weird issues with lag when gaming even though I had a good ping. What I did was finally disable the firewall on the router while keeping my software firewall on. I'm still experimenting to find the cause but I suspect it may have been an issue. I hesitate to recommend turning it off but if you have another firewall solution, it may help with performance.

Yes, especially under high traffic, the firewall is a major source of latency. Depending on the features enabled, it can bog down the main cpu, introducing delays in the data path.
 
Playing Battlefield 4 or Quake Live, I'd get a stuttering freeze, like I was lagging out but ping was good >50ms usually. It seemed to happen more when I updated to the recent Merlin release but still did it some on John's latest. I haven't had the issue yet but it seems sporadic which makes it hard to diagnose. I just did a Windows reinstall so I might turn it back on to see.

John's latest?

I will have to give it a try. I wonder if putting the console in DMZ would do more or less the same thing? That keeps all the other tings safe or double NAT i.e. have a secondary router do NAT for the rest of my equipment.

Yes, especially under high traffic, the firewall is a major source of latency. Depending on the features enabled, it can bog down the main cpu, introducing delays in the data path.

I never thought about the firewall using processing power, but it makes sense.
 
Yes, especially under high traffic, the firewall is a major source of latency. Depending on the features enabled, it can bog down the main cpu, introducing delays in the data path.

While gaming, might be ok disabling the SPI firewall, as NAT is going to protect things in any event if you're IPv4, the only question would be IPv6, and there, as long as you reject incoming IPv6 connections, should be fine...
 
While gaming, might be ok disabling the SPI firewall, as NAT is going to protect things in any event if you're IPv4, the only question would be IPv6, and there, as long as you reject incoming IPv6 connections, should be fine...

You mentioned earlier that disabling IPv6 could cause some NAT issues. Can you elaborate a little?

Also do you recommend turning on QoS? Years back, this used to be a performance problem. Any solution around this?
 
Would be interesting to see if people can report the difference in latency before and after optimisation e.g by pinging the DNS server of your ISP..
 
99% of my latency is because of my WAN bitrate. Even under high LAN load my ping to the gateway router is sub-millisecond. Ping beyond that is 13ms, at best.

For optimizing WAN latency, good traffic-shaping practices or proper use of of CoDel/FQ_CoDel have been my most effective choices.
 
aside from QoS, make sure to use wire to avoid ping spikes, configurable firewalls can also help give consistent performance.
Switching from a crappy router to a good router can also lower ping by 1ms.

Although a lot of the ping relates to WAN there are some ways to lower it. Depending on where the server is, sometimes a tunnel could lower the latency if it went through a better path but this is rare and difficult because it takes a lot of effort mapping routes but it is a solution since a number of ISPs do limit routes and traffic. For DSL and cable, the state of the cable, filters and the modem can also effect latency and bandwidth and perhaps some settings could help.

The biggest things to not get high latency is to use ethernet and not wifi, to have a good ISP and to choose a server with a low latency. If both the server and client have enough hardware resources latency will not increase. Personally i'd avoid cable because they tend to have a bad profile on the service they offer from the reliability and the speed you actually get. Virgin media for example claims upload to download ratio of 1:10 but many users report getting 1:20 practically. Upload bandwidth is important for gaming because games need to send packets, not only receive them. Some games like GTA 5 and space engineers use p2p which means the player uploads to the server and every player on that server instead of the traditional uploading to the server only and the server sending all the details to every player. While the old method used less bandwidth in total the new one is meant to reduce latency but it uses up a lot more bandwidth instead and because it uses p2p some ISPs may apply low priority QoS on it. With ISPs around the world still clinging on to the poor upload speed ratios despite no longer being limited by tech, they have made recent applications suffer because of it. In many games i always see players having issues because of this but upload is rarely ever checked for gaming performance despite being the most important factor other than hardware performance.
 
John's latest?

I will have to give it a try. I wonder if putting the console in DMZ would do more or less the same thing? That keeps all the other tings safe or double NAT i.e. have a secondary router do NAT for the rest of my equipment.



I never thought about the firewall using processing power, but it makes sense.

Yes, I usually put my main console in the DMZ. But I reinstalled Windows, enabled the router firewall again and play a few games and the weird freezing/spazzing in-game doesn't seem to happen anymore. Maybe it's Windows 10, there's so many things that happen behind the scenes that even Windows 7 didn't have. But I ran "top" on the router and doing "ping -t" while doing some network stuff and with the firewall on or off I didn't notice any appreciable difference in latency so I think it's good to know we don't have to sacrifice security for decent latency.
 
You mentioned earlier that disabling IPv6 could cause some NAT issues. Can you elaborate a little?

IPv6 pretty much doesn't have NAT from a console perspective, so if you ISP offers v6 support, I would use it...

IPv4 only, we start running into all the Open/Strict/blah... NAT issues with multiple player games (esp. if multiple player on the LAN and trying to play games with others/servers on the WAN side..)
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top