OPNsense Forum

English Forums => Hardware and Performance => Topic started by: TroutWA on October 30, 2025, 09:42:13 AM

Title: YouTube Performance issue.
Post by: TroutWA on October 30, 2025, 09:42:13 AM
So, this one is a strange one.

A long time user of Untangle, I decided to give OpnSense a go. Part of the reason was that the hardware now about 6 years old (a Chinese unbranded industrial PC with an intel 2 core processor and 4 ethernet ports)

I bought a GMKtec AMD Ryzen 5 7640HS Mini PC--NucBox M6 Ultra with 2x 2.5G Realtek ethernet ports

It all installed fine once I loaded the Realtek Drivers. Once I got it up and running I got download speeds of 960M and upload of 46M from a 1000M/50M link, so really happy. But I noticed that YouTube video struggle when I am viewing on my PCs. Mobile and TV are fine. It gets to the point that that it buffers even a 240p stream.

Somewhere I read it was an issue with OpnSense and the new Realtek cards.

So I loaded up PFsense on the old appliance and swapped it out (to avoid down time on the home network)

YouTube worked fine, network overall speed dropped 250M/30M.

Next, I got my new GMKtek loaded PFsense (struggled a bit with the drivers much easier process in OPNSense) and swapped it again and I get the same problem I had with OPNSence.

So yes, on the surface it does appear to be hardware related but why does it only affect YouTube on PC. Is there a fix other than swapping hardware. I am contemplating getting one of the Deciso Appliances but that probably won't happen for a few months, and the network cards are inbuild on the GMKtec so I can't swap them. Any idea?

Thanks,

Diego
Title: Re: YouTube Performance issue.
Post by: meyergru on October 30, 2025, 10:09:27 AM
Your up- and download speeds differ "bigly" - maybe try traffic shaping (see https://forum.opnsense.org/index.php?topic=42985.0, #26)?
Title: Re: YouTube Performance issue.
Post by: pfry on October 30, 2025, 02:20:58 PM
I wouldn't expect any issues related to asymmetry, with that much bandwidth. Any individual video should only run a few Mb/s. GoogTube is going to be QUIC (UDP) anyway, unless UDP 80/443 is blocked. I'd tend to look at the affected PCs - anything unusual about them.
Title: Re: YouTube Performance issue.
Post by: BrandyWine on October 30, 2025, 10:28:24 PM
Watch the lobby dashboard widget for LAN WAN data rates while watching a any stream (flix, hulu, tube, etc), seems they stream in data bursts and not a constant stream of data.

Mostly, the fw is a router based on freeBSD 14.3, so tune it to be a router.
Any other plugins enabled that would cause extra processing on every packet?
CPU MEM usage normal?
Title: Re: YouTube Performance issue.
Post by: TroutWA on October 31, 2025, 12:05:35 AM
Quote from: BrandyWine on October 30, 2025, 10:28:24 PMWatch the lobby dashboard widget for LAN WAN data rates while watching a any stream (flix, hulu, tube, etc), seems they stream in data bursts and not a constant stream of data.

Mostly, the fw is a router based on freeBSD 14.3, so tune it to be a router.
Any other plugins enabled that would cause extra processing on every packet?
CPU MEM usage normal?

Perfectly fine. And as I mentioned, YouTube works better on the underperforming hardware. But I have lower bandwidth over all.


Quote from: meyergru on October 30, 2025, 10:09:27 AMYour up- and download speeds differ "bigly" - maybe try traffic shaping (see https://forum.opnsense.org/index.php?topic=42985.0, #26)?

@meyergru unfortunately that's the way it is in Australia unless I get a business symmetrical plan at a much greater cost. BTW thank you for the link I will work through the recommendations.

Quote from: pfry on October 30, 2025, 02:20:58 PMI wouldn't expect any issues related to asymmetry, with that much bandwidth. Any individual video should only run a few Mb/s. GoogTube is going to be QUIC (UDP) anyway, unless UDP 80/443 is blocked. I'd tend to look at the affected PCs - anything unusual about them.

@pfry QUIC keeps popping up when I was researching the issue. But what does not make sense to me (probably because I don't know enough or understand the protocol) why is it only affecting Windows PCs and why does it go away if I swap the router with a lower performance router with identical configuration?

Thanks everyone for your assistance.

Diego
Title: Re: YouTube Performance issue.
Post by: pfry on October 31, 2025, 02:32:55 AM
Quote from: TroutWA on Today at 12:05:35 AM[...]
@pfry QUIC keeps popping up when I was researching the issue. But what does not make sense to me (probably because I don't know enough or understand the protocol) why is it only affecting Windows PCs and why does it go away if I swap the router with a lower performance router with identical configuration? [...]

It's usually firewall (all firewalls, including end station) or browser protocol support issues. Not always, of course. If UDP 80/443 is blocked or not supported, it falls back to TCP (making an assumption here, as I haven't tested it in a while)... which should be fine... I was going by the possibility that you had an unnoticed config difference between the old and new firewalls, but re-reading your post, it seems unlikely.

Looking at OPNsense, just check your sessions ("Firewall: Diagnostics: Sessions") or logs ("Firewall: Log Files: Live View") for (usually) UDP 443.

As a data point, I'm on a very sad old Windows machine right now. It works... fine, considering. Oh - it has an old RTL8110 plugged into an RTL8125 on my firewall. Perhaps "netstat -es" on the Windows machines might be useful, and you do the same on the firewall (should be "-i" and "-s" on FreeBSD).
Title: Re: YouTube Performance issue.
Post by: meyergru on October 31, 2025, 10:20:56 AM
Three more tidbits:

1. You can check if QUIC is the culprit here: https://cloudflare-quic.com/ If that does not work, you somehow block QUIC by not allowing UDP connections.

2. Because of the elaborate scheme Youtube uses in order to deliver their advertisements, problems can arise if you use blocking for any of their advertisement partnering networks, like geoip blocking, DNSBL, crowdsec, suricata or zenarmor. Disable those blocks temporarily to see if they matter.

3. Same thing goes for any browser extensions that aim at cookie consent or ad-blocking. Matter-of-fact, just these days, youtube changed their video player, which that gives some strange effects with AdBlockPlus. Install another browser and try if that works or disable all extensions.

Yet, as I stated earlier, I have seen some strange effects with video buffering in the presence of bufferbloat. This also has to do with the fact that youtube videos are delivered in small chunks, not one whole file.
Title: Re: YouTube Performance issue.
Post by: Monviech (Cedrik) on October 31, 2025, 12:02:58 PM
I assumed that only upload can be shaped.

Download has already been delivered to the appliance, the appliance has no other choice but to process all packets delivered to it.

So shaping should be done by the device that has the bottleneck.

Most of the time that would be the ISP network equipment before the termination point at the customer, since cable or DSL is the pipe with the most constraints.

I assumed bufferbloat comes from not processing TCP ACKs fast enough when the upload is very limited (under 1Mbit/s).

Most modern modem equipment already talks with the DSLAM termination points and use PTM via broadcom chips and have smaller buffers so tuning should not be needed.
Title: Re: YouTube Performance issue.
Post by: meyergru on October 31, 2025, 01:01:15 PM
I know the theory, Cedrik. However, when I look at this test: https://speed.cloudflare.com/ without traffic shaping enabled, I definitely see a sudden drop in download speed until the TCP algorithm finally notices that the downstream buffers were being overrun.

2025-10-31 12_56_42-Internet Speed Test - Measure Network Performance _ Cloudflare — Mozilla Firefox.png

With traffic shaping enabled, this does not occur:

2025-10-31 12_58_27-Internet Speed Test - Measure Network Performance _ Cloudflare — Mozilla Firefox.png

With youtube videos split into parts, these drops can occur on every part of the video, leading to stutters. Usually, the buffering is so generous that you do not notice it, but when you look at a fine-grained download graph, you will see it.
Title: Re: YouTube Performance issue.
Post by: Monviech (Cedrik) on October 31, 2025, 02:07:19 PM
Interesting, thanks for the data :)
Title: Re: YouTube Performance issue.
Post by: JamesFrisch on October 31, 2025, 02:46:29 PM
Wild guess, but have you tried using Chrome instead of Firefox? There are rumors of Google making Youtube intentionally bad on none Chrome browsers.