Question How do I fix inconsistent latency

SomeGuyonTHW

Reputable
Oct 9, 2020
195
18
4,595
Ethernet, when I ping google for example, there is 0% packet loss.

e.g when I enter ping -n 100 8.8.8.8 in cmd, ping is usually 40-50ms, for 10times, then slowly becomes 60, 70, 80, 100, 120 then suddenly drops back to 50, it is 50 for ~10 seconds then starts to rise again.
so logs look like this generally:
~50, 50, 50, 50, 50, 50, 50, 60, 80, 90, 100, 110, 50, 50, 50, 50 ,50 70, 80, 90, 100, 50, 50 etc... the cycle continues.
 
In general you will not be able to detect 50ms of jitter in a game. The software tends to allow for variations of this size. You might see 100ms or 200ms of jitter.

Next it depends on where the problem is. You can do nothing about anything outside your house.

Latency tends to be pretty much a fixed value based on distance. Variations tend to be some overload condition. Data will be held in buffers rather than discarded if a connection is busy but the being placed in a buffer delays the data. Almost every application works better because of this, games would actually rather have the data discarded.....at least until too much data was discarded.

Pretty standard tests. Run tracert 8.8.8.8. This will not likely show anything, the goal is to get the IP of the router in the path.

Start with ping to hop 1 which is your router IP. You tend to never see ping spikes on this unless you are using wifi. If you do it is some kind of software issue with the pc or router.

Next do the same to hop 2 which should be the ISP first router. A very common cause of latency spikes in this hop is if your internet is being over utilized. You need to check to be sure nothing is transfering large amounts of data at that time. If you have a larger internet connection it tend to be upload rates that have the issue since they are smaller. Be sure nothing in your house for example is backing up data to say cloud storage.

If both hop 1 and hop 2 are good it is going to be very hard to get fixed. This would mean there was some kind of capacity issue between your ISP routers or even worse in another ISP router.

Now this could also be something other than a network problem. If you machine would for example spike to 100% cpu load it also can cause delays.
 

SomeGuyonTHW

Reputable
Oct 9, 2020
195
18
4,595
In general you will not be able to detect 50ms of jitter in a game. The software tends to allow for variations of this size. You might see 100ms or 200ms of jitter.

Next it depends on where the problem is. You can do nothing about anything outside your house.

Latency tends to be pretty much a fixed value based on distance. Variations tend to be some overload condition. Data will be held in buffers rather than discarded if a connection is busy but the being placed in a buffer delays the data. Almost every application works better because of this, games would actually rather have the data discarded.....at least until too much data was discarded.

Pretty standard tests. Run tracert 8.8.8.8. This will not likely show anything, the goal is to get the IP of the router in the path.

Start with ping to hop 1 which is your router IP. You tend to never see ping spikes on this unless you are using wifi. If you do it is some kind of software issue with the pc or router.

Next do the same to hop 2 which should be the ISP first router. A very common cause of latency spikes in this hop is if your internet is being over utilized. You need to check to be sure nothing is transfering large amounts of data at that time. If you have a larger internet connection it tend to be upload rates that have the issue since they are smaller. Be sure nothing in your house for example is backing up data to say cloud storage.

If both hop 1 and hop 2 are good it is going to be very hard to get fixed. This would mean there was some kind of capacity issue between your ISP routers or even worse in another ISP router.

Now this could also be something other than a network problem. If you machine would for example spike to 100% cpu load it also can cause delays.
Well, pinging google is an optimal scenario, games work differently, and it feels like as if I'm disconnected whenever this happens (if it is in a 50-110 range with google it doesn't mean it is 50-110 in games too, it is far worse, can jump up to 300-400 for moments)

I pinged my modem 100 times, a consistent 1< ms
for second one, I have nothing really, no cloud backup or anything that sends data without my permission. I looked in task manager nothing is using network either
also, thansk for explanations
 
Your problem when using a game to test network is it is such complex software and many things for example cause poor frame rates and lag.

You could for example set the resolution to 4k and everything to max and it can cause lag in the game. Many games attempt to blame the network but if you change the video setting to lower it magically gets better. The actual video stream is not sent over the network and the network traffic tends to be the same no matter what resolution you are running. What happens is the games get busy in say a video processing routing and when they get done and check the network delay/ping they blame the extra time on the network even though the data may have been sitting there waiting to be read.

So you really want to use ping commands to test but even this has to be used with care. The game server and the google server are not in the same data center and will likely have different ping times because the path through the internet is different. Although you can do lots of digging around to maybe find where the difference is you can not change anything about how your data travels or how ISP are interconnected.

In general you are better off spending your time on things you can actually fix.

So I would still test to hop 2 and hope you see a problem.

There is a possibility it is some software on the pc but it is going to be hard to test if it is only a game that can show the problem. Normally you would do things like run linux from a USB boot image. That way you would know if it was some strange hardware issue or if it was windows or some other software on windows. Problem is most games will not run under linux and even if they do it is a massive pain to install it to run on a USB so you do not damage your windows install. You can of course run speedtest and ping with the default install but if these tools do not show the problem them it tends to not be worth the effort to even try this.