Watching youtube makes my ping go apestool

DudeInAGoodMood

Distinguished
May 25, 2013
48
0
18,530
I share my connection with 2 PCs, one being mine and other being little cousins whose hooked on those popular youtube gaming channels like PewDiePie and the rest. That's not important, what is important that for some reason whenever he's watching those videos, ping goes absolutely crazy. Normally, pinging google.com comes back in about 10ms, but when he's watching YT, it goes up to 300ms, which makes pretty much everything unbearable.

Considering that youtube doesn't use P2P and that our limited upload remains pretty much free, what is the reason for this and is there a way to fix it? Watching youtube from my PC makes the ping go to about 50-60ms, which would make the whole thing ignorable, but 300ms is just crazy for such a benign action.

I suspected a faulty router, so I had it changed for a new one, but that didn't help. So, what are my options?
 
Solution


You said your ping goes from 10ms to 60ms when you watch Youtube and 10ms to 300ms when he watched Youtube.

The fact that you ping budges at all means Youtube is sending data faster than you can receive it. The difference in ping...


They're wired, my PC is directly wired to a router, while the other is going thru the switch. I just tried to hook my PC up thru the switch, it didn't change a thing, still getting a ping of ~60ms going thru the switch, so it must be the PC, or some configuration with it?
 
How fast is your internet connection? What model router are you using?

Look through your router's advanced settings for something called QoS or prioritization. If you can find what network ports your game uses, you can give them top priority so the router always handles them first, YT data second.
 


10mbs downstream, 1mbs upstream

Router is Huawei HG532e, going to its firmware settings, I'm not seeing anything with QoS or prioritization.

Is there a tutorial on how to change the priority? Good guess btw, never mentioned my game :)
 
Maybe your ISP has a decent connection to the Internet and Youtube is flooding you? Youtube can saturate my 100Mb connection for 10-15 seconds while it buffers and I have been able to do some testing that shows Youtube can saturate a 1Gb connection for at least some amount of time.
 


As I said, the ping jumps to 60ms when I'm using Youtube on my PC. I'm guessing that some configuration regarding data usage on youtube is set up differently for both of us, I just have no idea where to start to look.
 


You said your ping goes from 10ms to 60ms when you watch Youtube and 10ms to 300ms when he watched Youtube.

The fact that you ping budges at all means Youtube is sending data faster than you can receive it. The difference in ping is just a difference in bufferbloat, which could easily be explained by a OS TCP configurations, which browser you use, your browser settings, or even what videos are being watched.

The simplified answer is the way TCP works is it sends data faster and faster until packets get lost, then it backs off a little bit. Bufferbloat causes the large pings. You have buffers in your ISP's network that are really large and can hold 300ms+ worth of data, probably your modem. As Youtube sends faster and faster, at some point instead of receiving faster, your buffers start to fill up and create latency. Once some packets get dropped, Youtube backs off, but equalizes its send rate with about how fast you're receiving the data. The problem is you have 300ms of data buffered up. If you're receiving data as fast as they're sending the data, you'll never get rid of that 300ms of extra data.

There are ways to fight bufferbloat so your ping almost never changes, but it involves advanced topics of traffic shaping or custom firewalls. There is work being done to make bufferbloat a thing of the past, but it's still in progress. Look up "Cake AQM".
 
Solution