Latency/High RTT and RTTsd Watching YouTube Videos
Good evening all. So, I've got an issue I've been trying to correct for a while. I have pfSense installed on an old Sony Vaio and I'm using it as a router for Google Fiber Gigabit internet. I've got one TP-Link Archer C7 AC1750 running Lede as my only Wifi broadcaster/unmanaged switch.
I work from home so I use a lot of internet. I can perform Skype calls, Go-To-Meeting calls, without any problems. I can access a corporate VPN or cloud software. I also stream TV/Movies to my smart TV and I don't seem to have any issues at all.
However, if I start watching YouTube videos, my network starts to slow down. Looking at the Gateway statistics, I see high RTT and RTTsd numbers and I have to reboot in order to get internet traffic to flow again. I could watch a YouTube video and not have a problem but, sometimes, after a while, I'll start to experience slowdowns, latency and blocked internet connections again. It doesn't happen with any other service but with YouTube.
Assuming that it's buffer bloat, I've tried setting up fq-codel limiters on my WAN connection following these instructions:
...and yet still having a problem with YouTube videos causing latency.
Has anyone else experienced this and fixed this issue? Any assistance would be greatly appreciated.
I assume you're not watching multiple 4K streams! How much bandwidth do you see YouTube using? How close to what the link supports is that? Do you see problems with YouTube itself or just everything else?
Odd indeed. It only seems to be YouTube giving me grief.
To answer your questions: no, I'm just watching a single video at a time and usually either 720P or 1080P.
How can I tell the bandwidth usage of YouTube?
If you have the traffic graphs widget on the dashboard you can see it there otherwise you can see them in Status > Traffic Graphs. I can't imagine it comes close to filling the connections but it's good to check.
I assume you have a pretty high speed WAN on Google fibre?
Yes, I have Google Fiber Gigabit connection. I've plugged my cable directly from the ONT to the pfSense box.
I'll try watching YouTube videos while watching the traffic graphs and let you know what I find.
tman222 last edited by
Hi @PctSevens -
I have a couple more questions for you:
- When you see this jump in latency - what CPU usage look like on the pfSense box? If it's high, which process is consuming the CPU?
- Does this in increase in latency on the pfSense box happen BOTH over wired and wireless client connections (i.e. is there a difference playing the video while connected wireless over wired)?
- What version of pfSense are you running and what packages (if any) do you have installed?
Thanks for the replies. To answer some questions:
- I'm running pfSense 2.4.4-RELEASE-p2.
- I currently have the following packages installed: CRON, openvpn-client-export, snort, squid, squidGuard (though I think squidGuard may be redundant since I'm using OpenDNS as my DNS server)
- Latency happens with both wired and wireless connections.
I decided to do a screen record on one computer with CPU and traffic stats on while performing actions on another PC. I finished a video call on GoToMeeting and started watching YouTube videos.
Here's a link to a video (ironically on YouTube) showing my traffic graph and CPU stats while I was working away. It's at the 9:49 mark you'll see the traffic graph drop...that's when I noticed the freezing: pfSense while watching YouTube
Ok there's not much to see there because the system activity page was not updating. I expect to see those number changing every second. You might want to use
top -aSHfrom the command line instead.
However I do see that the NICs you have are re and msk which are both known to have 'issues' at times.
Since you don't seem to lose connectivity to the webgui I would suggest the WAN NIC may be probelm here. Which is the WAN?
Do the system logs show anything immediately after the connection appears to drop?
You might also disable Snort as a test, especially if it's running in blocking mode.
So, I think I found the source of my issue: my DNS setting.
I had shut off and uninstalled SquidGuard, Squid and Snort (in that order) and still had no luck. As soon as I changed my DNS settings to Google (for example), I no longer have any latency issues. Put back Squid and Snort and still no latency.
So, it looks like something with OpenDNS is causing my problem.
Off to try another DNS to see if it's still running ok.