Network errors with Hyper-V Switch based on Mellanox Connectx-3

I have two TrueNAS servers, one is on Windows 10 and another is on Server 2019, both running in Hyper-V. I am having a similar issue on both systems. TrueNAS runs on FreeBSD 12.2. I have narrowed it down to a networking issue inside of the VM. The issue doesn't occur anywhere else on my network or in a Win10 guest VM on same system and it is not a problem with the disk drives because it occurs writing to a single SSD as well as a Z2 array. Both systems are using a virtual switch based on Mellanox Connectx-3 10G adapters.

What is happening is that everything boots up and runs fine, but I will get random network errors. Every so often, 5-30 minutes, I get "an unexpected network error has occurred" in Beyond Compare and/or qBittorrent when I am writing to the TrueNAS server. One file will error and then it will continue with the rest of the copy and I just have to resend that one file. I can copy several Terabytes and maybe a handful of files will fail or in qBittorrent a few downloads will error every 5-30 minutes usually resulting in all the downloads failing several times.

I have tried # sysctl net.link.ether.inet.max_age=60 but didn't seem to help. I am wired in with 10G fiber. I have tried disabling VMQ and also Enable MAC address spoofing in Hyper-V, but didn't make a difference that I can tell. Any idea what the problem is, I would really like to be able to use this server reliably. Please help
 
I saw that, however they have already said they don't recommend Hyper-V, I have an issue open there but so far no response. If it is an underlying issue with FreeBSD 12.2 then maybe someone has an idea how to troubleshoot?
 
So, this happens a lot more frequently when the host is under heavy load. I have 32GB memory coming from slowegg, it may be a resource issue. I have 16GB total with 8GB dedicated to FreeBSD. I would think 8GB for host would be enough.
 
I changed the NIC in the Virtual Switch from Mellanox Connectx-3 to the built-in RealTek Gigabit adapter and problem persists. I also upgraded the ram to 32GB and set the CPU reserve to 100%, still same issue.
 
Back
Top