[solved] pfSense (2.6.0 & 22.01 ) is very slow on Hyper-V
-
Looking at that commit there are some things adds we should be able to check. Some sysctls:
dev.hn.0.rx.0.rsc_drop: 0 dev.hn.0.rx.0.rsc_pkts: 0
And if you boot verbose the logs show:
Feb 24 18:51:42 kernel hn0: hwcaps rsc: ip4 1 ip6 1 Feb 24 18:51:42 kernel hn0: offload rsc: ip4 2, ip6 2
So I wonder if this is somehow not being disabled because it still seems to fit:
It only affects TCP.
It only affects traffic between VMs in the same host.Steve
-
@stephenw10 said in After Upgrade inter (V)LAN communication is very slow (on Hyper-V).:
It only affects TCP.
Confirmed for me. UDP streams were fine. RSC affects only with TCP packets (by definition).
It only affects traffic between VMs in the same host.
In my case, because my traffic comes in on other physcial nics, and those physical nics tie to a physical nic with virtual nics (vlan tagged by hyper-v) and the clients live on those VLANs, it definitely affects traffic outside of the host.
-
Be good to get those values from an affected VM. I grabbed those from Azure which isn't.
Steve
-
@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?
-
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
-
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.
-
VMQ disabled on all VMs
RSC disabled on Hyper-V HostPS 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'
-
@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).
Definitely two different issues.
-
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
-
@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.
-
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
-
@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/netvscI would expect an 13-stable snapshot to fail the same way.
Steve
-
@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.
-
@bob-dig just open the VM preview window, reboot and on the boot screen hit the "boot options" and select verbose boot
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
-
@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:
-
@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." -
This post is deleted! -
@bob-dig you missed a "."
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
-
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
-
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