Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [solved] pfSense (2.6.0 & 22.01 ) is very slow on Hyper-V

    Scheduled Pinned Locked Moved Virtualization
    187 Posts 36 Posters 112.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      Be good to get those values from an affected VM. I grabbed those from Azure which isn't.

      Steve

      H 1 Reply Last reply Reply Quote 0
      • H
        hendryjl @stephenw10
        last edited by

        @stephenw10 said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

        Be good to get those values from an affected VM

        I switched RSC back on, booted the VM back up, and verified the problem existed. Here are the ctls (attached).sysctls.txt

        I booted verbose, but missed the output. I couldn't find it in the logs. Am I going to have to do a serial console to see them?

        T 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Nice, so you see traffic in those counters with RSC enabled in the vswitches when the problem exists. Do you stil see data there when RSC is disabled in the switches?

          It would be interesting to see if that varies for VMs that are still hitting issues even with RSC disabled.

          Steve

          H 1 Reply Last reply Reply Quote 0
          • T
            ttmcmurry @hendryjl
            last edited by ttmcmurry

            I still think there's more than one issue. My post several days ago is with a pfSense on hyper-v, gen 2 vm, with no vlans defined in pfSense, vnic, or vswitch, and RSC is disabled. And I had (well, have if I turn the pfSense 2.6 vm back on) the slow performance issue.

            Perhaps for hyper-v configuration with native interfaces throughout, RSC is not a factor. Perhaps at best a clue.

            For those using hyper-v with vlans and disabling RSC is the fix, that's great, and also a clue.

            My mind keeps going back to the troubleshooting where migrating the pfSense VM to another host fixing slow network performance. I'm beginning to think the issue is how FreeBSD is interfacing with the hn driver. In my physical setup, technically my LAN is a directly connected native vSwitch to the hyper-v host. Any device connected to hn1 (in my case) is connected to the same physical hyper-v host. pfSense is routing data between different vNICs which are connected to different vSwitches which are bound to unique physical uplinks.

            Unfortunately I haven't time to prove this or packet cap it. This seems OS/Driver related to me.

            1 Reply Last reply Reply Quote 0
            • m0njiM
              m0nji
              last edited by m0nji

              VMQ disabled on all VMs
              RSC disabled on Hyper-V Host

              PS C:\WINDOWS\system32> Get-VMSwitch -Name "Bridged_LAN" | Select-Object *RSC*
              
              SoftwareRscEnabled RscOffloadEnabled
              ------------------ -----------------
                           False             False
              

              fresh booted FreeBSD 12.3 after 120 seconds iperf test (with speed problems)

              dev.hn.0.rx.0.rsc_drop: 0
              dev.hn.1.rx.0.rsc_drop: 0
              dev.hn.2.rx.0.rsc_drop: 0
              dev.hn.2.rx.0.rsc_pkts: 0
              dev.hn.1.rx.0.rsc_pkts: 0
              dev.hn.0.rx.0.rsc_pkts: 321
              

              fresh booted FreeBSD 13.0 after 120s iperf test (speed problem does not exist)
              sysctl's do not exist!

              root@freebsd130:~ # sysctl dev.hn.0.rx.0.rsc_drop
              sysctl: unknown oid 'dev.hn.0.rx.0.rsc_drop'
              root@freebsd130:~ # sysctl dev.hn.1rx.0.rsc_drop
              sysctl: unknown oid 'dev.hn.1.rx.0.rsc_drop'
              root@freebsd130:~ # sysctl dev.hn.2rx.0.rsc_drop
              sysctl: unknown oid 'dev.hn.2.rx.0.rsc_drop'
              root@freebsd130:~ # sysctl dev.hn.0rx.0.rsc_pkts
              sysctl: unknown oid 'dev.hn.0.rx.0.rsc_pkts'
              root@freebsd130:~ # sysctl dev.hn.1rx.0.rsc_pkts
              sysctl: unknown oid 'dev.hn.1.rx.0.rsc_pkts'
              root@freebsd130:~ # sysctl dev.hn.2rx.0.rsc_pkts
              sysctl: unknown oid 'dev.hn.2.rx.0.rsc_pkts'
              

              Intel i3-N305 / 4 x 2.5Gbe LAN @2.7.2-Release
              WAN: Vodafone 1000/50, Telekom 250/40; Switch: USW Enterprise 8 PoE, USW Flex XG, US-8-60W; Wifi: Unifi 6 Lite AP, U6 Mesh

              1 Reply Last reply Reply Quote 1
              • H
                hendryjl @stephenw10
                last edited by

                @stephenw10 said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

                It would be interesting to see if that varies for VMs that are still hitting issues even with RSC disabled.

                Shutdown, Disable RCS on virtual switches, Boot, Test (success), Check CTLs... results attached (all 0's - good).

                sysctls_rcsdisabled.txt

                Definitely two different issues.

                1 Reply Last reply Reply Quote 0
                • m0njiM
                  m0nji
                  last edited by m0nji

                  just a theory:

                  on FreeBSD 13.0, RSC was removed completly from the kernel/system, thats why the sysctl's doesn't exist and so we do not have these problems?

                  on FreeBSD 12.3, RSC can't be disabled completly under some circumstances (drivers, nic's), thats why some people do see these problems?

                  if i interpret my values correctly, then even with RSC disabled, some packages hit RSC?! (321 packages) at least if "pkts" means packages ;)

                  EDIT: i think i will test tomorrow FreeBSD 12.2 (pfsense 2.5.x) and will see if RSC makes a difference there

                  Intel i3-N305 / 4 x 2.5Gbe LAN @2.7.2-Release
                  WAN: Vodafone 1000/50, Telekom 250/40; Switch: USW Enterprise 8 PoE, USW Flex XG, US-8-60W; Wifi: Unifi 6 Lite AP, U6 Mesh

                  H stephenw10S 2 Replies Last reply Reply Quote 0
                  • H
                    hendryjl @m0nji
                    last edited by

                    @m0nji said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

                    EDIT: i think i will test tomorrow FreeBSD 12.2 (pfsense 2.5.x) and will see if RSC makes a difference there

                    I still have my image of 2.5.2 before I applied 2.6. I reverted to it when I first had my issues (before I ever tried disabling RSC on the Hyper-V virtual switches). I didn't see any issues. Later tonight I will revert to it again and see what the sysctls say.

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      RSC support wasn't added to hn(4) until 12.3 so I would expect to see no sysctls there.

                      The driver looks to try to use them based on the VNIC revision. I'm speculating that under some set of circumstances the driver/host/platform maybe trying and failing to use RSC even when it's disabled in the vswitch.

                      I'd like to check the sysctl and verbose boot logs from someone who is hitting this still with rsc seemingly disabled. Since we know they should be all zeros if it's actually disabled.

                      Steve

                      Bob.DigB 1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator @m0nji
                        last edited by stephenw10

                        @m0nji said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

                        on FreeBSD 13.0, RSC was removed completly from the kernel/system, thats why the sysctl's doesn't exist and so we do not have these problems?

                        Ah, nope! It's because FreeBSD 13 is actually older than 12.3 and doesn't have any of the RSC support patches:
                        https://github.com/freebsd/freebsd-src/tree/releng/13.0/sys/dev/hyperv/netvsc

                        I would expect an 13-stable snapshot to fail the same way.

                        Steve

                        1 Reply Last reply Reply Quote 1
                        • Bob.DigB
                          Bob.Dig LAYER 8 @stephenw10
                          last edited by Bob.Dig

                          @stephenw10 said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

                          I'd like to check the sysctl and verbose boot logs from someone who is hitting this still with rsc seemingly disabled. Since we know they should be all zeros if it's actually disabled.

                          Steve

                          I would like to but I need description for dummies how to do it.

                          m0njiM 1 Reply Last reply Reply Quote 0
                          • m0njiM
                            m0nji @Bob.Dig
                            last edited by m0nji

                            @bob-dig just open the VM preview window, reboot and on the boot screen hit the "boot options" and select verbose boot

                            63e6e7d6-391f-42f5-b3ba-d3c8cde56986-image.png

                            FreeBSD 12.3

                            root@freebsd123:~ # grep -i "rsc" /var/log/messages
                            Feb 25 08:48:02 freebsd123 kernel: hn0: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 08:48:02 freebsd123 kernel: hn0: offload rsc: ip4 2, ip6 2
                            Feb 25 08:48:02 freebsd123 kernel: hn1: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 08:48:02 freebsd123 kernel: hn1: offload rsc: ip4 2, ip6 2
                            Feb 25 08:48:02 freebsd123 kernel: hn2: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 08:48:02 freebsd123 kernel: hn2: offload rsc: ip4 2, ip6 2
                            
                            

                            pfSense 2.6.0

                            [2.6.0-RELEASE][admin@pfSense.home.arpa]/root: grep -i "rsc" /var/log/system.log                
                            Feb 25 07:56:22 pfSense kernel: hn0: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 07:56:22 pfSense kernel: hn0: offload rsc: ip4 2, ip6 2
                            Feb 25 07:56:22 pfSense kernel: hn1: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 07:56:22 pfSense kernel: hn1: offload rsc: ip4 2, ip6 2
                            Feb 25 07:56:22 pfSense kernel: hn2: hwcaps rsc: ip4 1 ip6 1
                            Feb 25 07:56:22 pfSense kernel: hn2: offload rsc: ip4 2, ip6 2
                            
                            

                            Intel i3-N305 / 4 x 2.5Gbe LAN @2.7.2-Release
                            WAN: Vodafone 1000/50, Telekom 250/40; Switch: USW Enterprise 8 PoE, USW Flex XG, US-8-60W; Wifi: Unifi 6 Lite AP, U6 Mesh

                            Bob.DigB 1 Reply Last reply Reply Quote 1
                            • Bob.DigB
                              Bob.Dig LAYER 8 @m0nji
                              last edited by Bob.Dig

                              @m0nji I tried this with 2.5.2. I don't see anything regarding rsc in the logs or OS Boot log.
                              Also where to put those commands in? If I try with putty, it gives my permission denied. In the WebUI there is no output as well.

                              So I guess not noob friendly enough. 😓

                              
                              Enter an option: 8
                              
                              [2.5.2-RELEASE][admin@pfSense.home.arpa]/root: # grep -i "rsc" /var/log/messages                                      
                              #: Command not found.
                              [2.5.2-RELEASE][admin@pfSense.home.arpa]/root: grep -i "rsc" /var/log/system.log                                      
                              [2.5.2-RELEASE][admin@pfSense.home.arpa]/root: ~ # grep -i "rsc" /var/log/messages
                              /root: Permission denied.
                              [2.5.2-RELEASE][admin@pfSense.home.arpa]/root:
                              
                              
                              m0njiM 1 Reply Last reply Reply Quote 0
                              • m0njiM
                                m0nji @Bob.Dig
                                last edited by

                                @bob-dig i think your output is correct. you should not see anything RSC related on pfSense 2.5.x

                                This is what @stephenw10 said:
                                "RSC support wasn't added to hn(4) until 12.3 so I would expect to see no sysctls there."

                                Intel i3-N305 / 4 x 2.5Gbe LAN @2.7.2-Release
                                WAN: Vodafone 1000/50, Telekom 250/40; Switch: USW Enterprise 8 PoE, USW Flex XG, US-8-60W; Wifi: Unifi 6 Lite AP, U6 Mesh

                                Bob.DigB 1 Reply Last reply Reply Quote 1
                                • Bob.DigB
                                  Bob.Dig LAYER 8 @m0nji
                                  last edited by Bob.Dig

                                  This post is deleted!
                                  m0njiM 1 Reply Last reply Reply Quote 0
                                  • m0njiM
                                    m0nji @Bob.Dig
                                    last edited by m0nji

                                    @bob-dig you missed a "."
                                    2a56818d-af59-4334-a94b-62baab96adfe-image.png

                                    hn.0 is probably the wan interface. you should also try hn.1, hn.2 and hn.3

                                    EDIT: you already fixed your post ;) try it also for hn1, hn2 and hn3. it depends which hn adapter you use

                                    EDIT2: if i understood it correctly, then none hn adapter should give you a value >0 if RSC is disabled. if it tells you a value >0 then the setting RSC disabled does not realy work

                                    Intel i3-N305 / 4 x 2.5Gbe LAN @2.7.2-Release
                                    WAN: Vodafone 1000/50, Telekom 250/40; Switch: USW Enterprise 8 PoE, USW Flex XG, US-8-60W; Wifi: Unifi 6 Lite AP, U6 Mesh

                                    Bob.DigB 1 Reply Last reply Reply Quote 1
                                    • Bob.DigB
                                      Bob.Dig LAYER 8 @m0nji
                                      last edited by Bob.Dig

                                      2.6:

                                      SoftwareRscEnabled RscOffloadEnabled
                                      ------------------ -----------------
                                                   False             False
                                                   False             False
                                                   False             False
                                      
                                      grep -i "rsc" /var/log/system.log
                                      
                                      Feb 25 13:18:24 pfSense kernel: hn0: hwcaps rsc: ip4 1 ip6 1
                                      Feb 25 13:18:24 pfSense kernel: hn0: offload rsc: ip4 2, ip6 2
                                      Feb 25 13:18:24 pfSense kernel: hn1: hwcaps rsc: ip4 1 ip6 1
                                      Feb 25 13:18:24 pfSense kernel: hn1: offload rsc: ip4 2, ip6 2
                                      Feb 25 13:18:24 pfSense kernel: hn2: hwcaps rsc: ip4 1 ip6 1
                                      Feb 25 13:18:24 pfSense kernel: hn2: offload rsc: ip4 2, ip6 2
                                      

                                      While "copying":

                                      sysctl dev.hn.1.rx.0.rsc_drop
                                      sysctl dev.hn.1.rx.0.rsc_pkts
                                      sysctl dev.hn.2.rx.0.rsc_drop
                                      sysctl dev.hn.2.rx.0.rsc_pkts
                                      
                                      [2.6.0-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.hn.1.rx.0.rsc_drop
                                      dev.hn.1.rx.0.rsc_drop: 0
                                      [2.6.0-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.hn.1.rx.0.rsc_pkts
                                      dev.hn.1.rx.0.rsc_pkts: 0
                                      [2.6.0-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.hn.2.rx.0.rsc_drop
                                      dev.hn.2.rx.0.rsc_drop: 0
                                      [2.6.0-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.hn.2.rx.0.rsc_pkts
                                      dev.hn.2.rx.0.rsc_pkts: 107
                                      

                                      The last number constantly rises.

                                      Everything stays the same for me if I re-enable rsc in Windows, no difference at all.

                                      SoftwareRscEnabled RscOffloadEnabled
                                      ------------------ -----------------
                                                    True             False
                                                    True             False
                                                    True             False
                                      
                                      1 Reply Last reply Reply Quote 1
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Hmm, so just to be clear you are seeing the RSC packets counter increment whether or not you have disabled RSC on the vswitch that interface is connected to?

                                        That seems like a different result to those for whom disabling RSC solved the issue. And seems to support my conjecture... 🤔

                                        Unclear what we can do about it though if that is the case. Yet.

                                        Steve

                                        Bob.DigB 1 Reply Last reply Reply Quote 0
                                        • Bob.DigB
                                          Bob.Dig LAYER 8 @stephenw10
                                          last edited by

                                          @stephenw10 said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:

                                          Hmm, so just to be clear you are seeing the RSC packets counter increment whether or not you have disabled RSC on the vswitch that interface is connected to?

                                          True

                                          Unclear what we can do about it though if that is the case. Yet.

                                          I hope you guys figure it out.

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            Ok, so we need more data points here to be sure it's actually what's happening.

                                            But assuming that's true it appears:
                                            There's an issue with the RSC code added in FreeBSD.
                                            In some situations the vswitches in hyper-v do not respect the disable RSC setting.

                                            Steve

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.