OPNsense Forum

English Forums => Zenarmor (Sensei) => Topic started by: tangofan on August 11, 2026, 07:38:17 PM

Title: Certain Youtube videos keep stalling when Zenarmor (free version) is enabled
Post by: tangofan on August 11, 2026, 07:38:17 PM
Yesterday I finally sat down and determined why the Youtube app on my Android Google Pixel Tablet was stalling for certain videos and determined that deactivating Zenarmor (by disabling the interface my tablet is connected to) solved the problem.

Here's the scenario:
- My OPNsense router (26.7.1_1) uses an Intel Celeron J6412 CPU.
- With Zenarmor enabled (on that interface) my tablet had a network speed of about 230 Mbit/s down and 33 Mbit/s up, so plenty of bandwidth for a 1440p video.
- With Zenarmor enabled, the 1080p version of the video would only stall very occasionally, but the 1440p version would stall constantly. Looking at the "Statistics for nerds" in the Android Youtube app, the 1440p video would load initially load only 6s into the readahead buffer and then stall, when the buffer goes to zero, then load another 6s and so on. With the 1080p video it would initially load more and then add to the readahead buffer, before it drops to zero. (Sometimes though, it would stall the first time and then increase the size of the readahead buffer during the subsequent load, which gave it enough buffer to initiate a followup http request before the read buffer goes empty.)
- When I disable Zenarmor, the initial readahead buffer is larger by several seconds, apparently giving the Youtube app time to add to it and enlarge it, before it ever goes to zero, so no stalls.
- Note: This does not happen for ALL Youtube videos, but just for a small subset of them. I am assuming it depends on the location of the Youtube CDN server that serves that particular video to me and may even change over time as videos get moved or replicated to different CDN servers. FWIW the 1440p version of this particular video (https://youtu.be/fDRMZcgycVI?si=0sqMbLbWrtWO6Bi-) had the problem for me (location: San Francisco Bay Area, South Bay).

I understand that the Youtube app is obviously programmed in a "suboptimal" way, e.g. it doesn't increase the readahead buffer, when it stalls at the 1440p videos with Zenarmor enabled, and it doesn't allow to set a size for a minimum initial readahead buffer. Still I doubt that Google will do anything about that (though I will report this problem).

Yet in the meantime it seems that the only solution is to disable Zenarmor, at least in the free version. (The paid version has options to exclude clients or domains from Zenarmor's processing that might mitigate this problems.) Or buy a new router with a CPU that has much higher single-thread performance... (Probably not.) Did anyone ever encounter a similar problem and found a better solution?