This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Slow web browsing when streaming Netflix

Just relatively recently I've started noticing poor performance when watching Netflix on my TV. The movie would start playing, and then all of the sudden I'd get an error message that the "content requested can't be played at this time, try again later", restarting the movie works fine, but same message appears after some time. The quality of the videos seem to be also suffering, although it would play in 1080p, you could see video encoding artifacts from time to time (e.g. color blocks, etc.)

Today I noticed that browsing the web, while Netflix streaming on TV, is also lagging. Most of the sites would load, but with big lag, occasionally a site wouldn't load at all. Accessing WebAdmin is also laggy, even SSH session suffer a lagged response (when using TOP or IFTOP commands for example). As soon as I stop the playback, everything comes back to normal operation, web, SSH, WebAdmin, etc. 

I also have a BD player with Netflix service (Oppo) and it has the same effect (causes lag). Streaming other sites (like YouTube) has no problem at all. So, only Netflix seems to be the issue.

I'm on the latest UTM firmware, TV and BD player are added to Web Protection exception for hosts, both are hardwired to my Cisco SG200-26 switch (not a WiFi AP problem). When looking at TOP command the CPU doesn't go above 2-3% when streaming. Nothing in the logs either (nothing that I could see at least). 

When browsing internal sites, on local network, no problems. Only content that's accessed through the UTM gateway has issues when streaming. So, I don't think it's an issue with the switch.  

Has anyone seen anything like this before?


This thread was automatically locked due to age.
  • Well, I was able to narrow it down to IPS. Turning off IPS seems to solve the issue.

    But I'm not sure what's happening. I see nothing in IPS log and there is no CPU spike either. I've tried to limit the ruleset to 
    • Is there a way to skip certain hosts from IPS, like you can for web protection? I've tried to add the IP addresses of the TV and BD player to IPS exceptions, but that didn't seem to work.
      • I sort of solved the issue. Once I removed the devices from the 'skip of the transparent mode' list of web protection (which I had done due to Netflix streaming issues), the problems stopped. I had to add an exception to skip the AV for those hosts, though. 

        This is still a very strange behavior. The IPS scans didn't stop, but no more random packet drops, which were causing the lagged response. 

        Maybe someone can explain why that could be.
        • Perhaps try changing the ICMP Values. The IPS may be limiting the number of lawyers, and Streaming uses a lot of patients (TCP and UDP)
          • Perhaps try changing the ICMP Values. The IPS may be limiting the number of lawyers, and Streaming uses a lot of patients (TCP and UDP)


            What? [:)] I didn't get it about the lawyers and patients. 

            Where do you change the ICMP values?
            • Perhaps try changing the ICMP Values. The IPS may be limiting the number of lawyers, and Streaming uses a lot of patients (TCP and UDP)


              changing the icmp will do nothing to address this situation.

              Owner:  Emmanuel Technology Consulting

              http://etc-md.com

              Former Sophos SG(Astaro) advocate/researcher/Silver Partner

              PfSense w/Suricata, ntopng, 

              Other addons to follow

              • changing the icmp will do nothing to address this situation.


                That's what I thought. This is weird behavior. 

                I'm reading some posts here lately and there seems to be an issue with the latest IPS signatures. Maybe that's the problem, I've not had this before.
            • Just relatively recently I've started noticing poor performance when watching Netflix on my TV. The movie would start playing, and then all of the sudden I'd get an error message that the "content requested can't be played at this time, try again later", restarting the movie works fine, but same message appears after some time. The quality of the videos seem to be also suffering, although it would play in 1080p, you could see video encoding artifacts from time to time (e.g. color blocks, etc.)

              Today I noticed that browsing the web, while Netflix streaming on TV, is also lagging. Most of the sites would load, but with big lag, occasionally a site wouldn't load at all. Accessing WebAdmin is also laggy, even SSH session suffer a lagged response (when using TOP or IFTOP commands for example). As soon as I stop the playback, everything comes back to normal operation, web, SSH, WebAdmin, etc. 

              I also have a BD player with Netflix service (Oppo) and it has the same effect (causes lag). Streaming other sites (like YouTube) has no problem at all. So, only Netflix seems to be the issue.

              I'm on the latest UTM firmware, TV and BD player are added to Web Protection exception for hosts, both are hardwired to my Cisco SG200-26 switch (not a WiFi AP problem). When looking at TOP command the CPU doesn't go above 2-3% when streaming. Nothing in the logs either (nothing that I could see at least). 

              When browsing internal sites, on local network, no problems. Only content that's accessed through the UTM gateway has issues when streaming. So, I don't think it's an issue with the switch.  

              Has anyone seen anything like this before?

              what is your hardware you are running utm on consist of?

              Owner:  Emmanuel Technology Consulting

              http://etc-md.com

              Former Sophos SG(Astaro) advocate/researcher/Silver Partner

              PfSense w/Suricata, ntopng, 

              Other addons to follow

              • Intel DQ77KB mini-itx board (Intel NICs)
                i3 3.3 ghz
                4GB Ram
                32 GB SSD

                Not virtualized.  

                Thanks!
                • I am not seeing this in any of my installs...thefact it is ips related is strange.  Try turning ips back on and atp off.

                  Owner:  Emmanuel Technology Consulting

                  http://etc-md.com

                  Former Sophos SG(Astaro) advocate/researcher/Silver Partner

                  PfSense w/Suricata, ntopng, 

                  Other addons to follow

                  • I have been noticing lag in browsing when it seems that my wife is watching Netflix. I just found this thread and have not done any testing yet, but my IDS is not turned on for my streaming network (Different NIC). In fact, no security is on the streaming network except for basic firewall rules. 

                    My server has more then enough oomph for my 50mbit connection. I have an i3 4370 3.8Ghz with 8 GB of RAM.  It is rare for me to see my CPU usage over 1%. Looking at my CPU log for today, it barley registers  (See attached files).

                    It almost seems like the proxy goes to sleep. Once you get it moving for a site, it is fine. Read for a bit, go to a new site and it is slow again. 

                    When I have some time, I will do some testing myself. Unfortunately, between work and school, my free time is rare. I am taking a break from homework to write this... 

                    C68
                    • I have been noticing lag in browsing when it seems that my wife is watching Netflix. I just found this thread and have not done any testing yet, but my IDS is not turned on for my streaming network (Different NIC). In fact, no security is on the streaming network except for basic firewall rules. 

                      My server has more then enough oomph for my 50mbit connection. I have an i3 4370 3.8Ghz with 8 GB of RAM.  It is rare for me to see my CPU usage over 1%. Looking at my CPU log for today, it barley registers  (See attached files).

                      It almost seems like the proxy goes to sleep. Once you get it moving for a site, it is fine. Read for a bit, go to a new site and it is slow again. 

                      When I have some time, I will do some testing myself. Unfortunately, between work and school, my free time is rare. I am taking a break from homework to write this... 

                      C68


                      The easiest test is to get a ping going to an external site and launch Netflix movie. Watch for dropped packets. That is what happens to me. 

                      Thanks!
                  • I hate to bear bad news but your issue is most likely your nics:
                    Intel 82579LM
                    Intel 82574L

                    There is an outstanding Linux kernel bug that is a known issue by Intel but Intel has so far not fixed it.  i am willing to say they are not going to.  The solution is to use newer i-seires nics or install broadcom netextremes.

                    Owner:  Emmanuel Technology Consulting

                    http://etc-md.com

                    Former Sophos SG(Astaro) advocate/researcher/Silver Partner

                    PfSense w/Suricata, ntopng, 

                    Other addons to follow

                    • I hate to bear bad news but your issue is most likely your nics:
                      Intel 82579LM
                      Intel 82574L

                      There is an outstanding Linux kernel bug that is a known issue by Intel but Intel has so far not fixed it.  i am willing to say they are not going to.  The solution is to use newer i-seires nics or install broadcom netextremes.


                      William, I heard of this, but couldn't find synopsis of the bug. Can you elaborate on what the bug is?

                      Thanks!
                      • William, I heard of this, but couldn't find synopsis of the bug. Can you elaborate on what the bug is?

                        Thanks!


                        it manifests itself in a number of ways.  For UTM the most common is random disconnects that are quick but they occur randomly and sometimes in serial fashion.  You would see it in your case as you are seeing it.  Your Intel chipset is now on par with realtek in my book.  Intel is no longer a blanket stable vendor for Linux you have to now make sure you are not using the chipsets you have on your mobo.  I would replace the nics as per my earlier post(disable the ones on the mobo).  This will necessitate a config backup/reinstall.

                        Owner:  Emmanuel Technology Consulting

                        http://etc-md.com

                        Former Sophos SG(Astaro) advocate/researcher/Silver Partner

                        PfSense w/Suricata, ntopng, 

                        Other addons to follow

                        • it manifests itself in a number of ways.  For UTM the most common is random disconnects that are quick but they occur randomly and sometimes in serial fashion.  You would see it in your case as you are seeing it.  Your Intel chipset is now on par with realtek in my book.  Intel is no longer a blanket stable vendor for Linux you have to now make sure you are not using the chipsets you have on your mobo.  I would replace the nics as per my earlier post(disable the ones on the mobo).  This will necessitate a config backup/reinstall.


                          It may be the bug, but I wanted to point out that in my case the issue isn't "random", only with certain conditions present (i.e. streaming netflix with IPS turned on and with host entered into skip list for web filtering).
                          • It may be the bug, but I wanted to point out that in my case the issue isn't "random", only with certain conditions present (i.e. streaming netflix with IPS turned on and with host entered into skip list for web filtering).


                            considering this isn't widespread and i have used a similar config i would replace the nics..if it still continues then you probably have a mis -configuration but we cannot be sure until all known problems are removed...and right now your nics are a known hardware problem.

                            Owner:  Emmanuel Technology Consulting

                            http://etc-md.com

                            Former Sophos SG(Astaro) advocate/researcher/Silver Partner

                            PfSense w/Suricata, ntopng, 

                            Other addons to follow

                        • Flooding Protection active I guess....
                          • Flooding Protection active I guess....


                            I can run flood protection without this issue..look at the chipsets on his nics.  They are the buggy ones.

                            Owner:  Emmanuel Technology Consulting

                            http://etc-md.com

                            Former Sophos SG(Astaro) advocate/researcher/Silver Partner

                            PfSense w/Suricata, ntopng, 

                            Other addons to follow

                          • Ok, looks like it's the driver bug after all. I came across this thread: https://ubb.sophos.com/closed-forums-read-only/utm-9-betas/utm-9-3-beta/54786-9-302-2-bug-adapter-e1000e-hangs-reset.html

                            after executing commands to disable TSO, GSO, and GRO on eth0 and 1, the issue went away.

                            My question now is: is there a way to make this change survive a reboot? I realize that it'll unlikely to survive an up2date update though, but at least surviving a reboot will work for me.
                            • Ok, looks like it's the driver bug after all. I came across this thread: https://ubb.sophos.com/closed-forums-read-only/utm-9-betas/utm-9-3-beta/54786-9-302-2-bug-adapter-e1000e-hangs-reset.html

                              My question now is: is there a way to make this change survive a reboot? 


                              Follow Mario's post https://ubb.sophos.com/closed-forums-read-only/utm-9-betas/utm-9-3-beta/54786-9-302-2-bug-adapter-e1000e-hangs-reset.html#post280668

                              I haven't used astaro outside a vm since v8 so don't know if the procedure works below. You can try and let us know[;)]

                              Looks like they are already disabling tso on some intel NICs. The procedure is outlined in the post below for better linking.
                              • How to add udev rule:

                                Login your console/ssh as root and type
                                cat /etc/udev/rules.d/20-nic.rules 
                                 and see if your NIC is already listed there. If it is already listed then you don't have to do anything. Sophos already has the tso disabled for your NIC.

                                If its not listed there, 
                                Check the vendor/device ID of your currently used Intel NIC,
                                 lspci -nn | grep -i ethernet
                                 and you will get output similar to
                                01:00.0 Ethernet controller [0200]: Intel 82579LM Gigabit Network Card [8086:1502]

                                All you are interested in is vendor ID which is 8086 for intel corporation
                                and device ID which is 1502 for 82579LM cards.

                                then create a new file 
                                vi /etc/udev/rules.d/21-my-nic.rules

                                press "i" on keyboard to insert text and paste the following line
                                SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x1502", RUN+="/lib/udev/nic-disable-tso"

                                 
                                If you have multiple Intel NICs with different device IDs then add another line for your second or third NIC. Then press esc on keyboard and type
                                :wq
                                 and press ENTER to save the file.

                                Reboot and test. Please let us know if this works for you. As noted in Mario's reply, this will survive a reboot and updates unless udev is updated.

                                Hope this helps
                                Bill