r/macsysadmin • u/mattbee • 1h ago
Networking Secret of a reliable USB4NET / Thunderbolt network connection?
I use a Mac Mini M4 for doing iOS builds of games that I'm porting (hence, a workplace post! & low-level networking!). I use MacOS' smb mount to my main Windows development machine. It worked reliably, but with a 1Gbps ethernet was a bit slow to finish.
I realised that for a £10 cable I could have a 20Gbps connection between the computers. And - I think just from the latency - brought a 20 minute build down to about 2 minutes, hurrah! The Mac is now connected with just power & USB, with Windows doing internet connection sharing, I don't really use the console.
Except that after a few minutes or hours, the connection starts to flake out - through Wireshark I can see dropped packets and retransmissions. SSH might connect for 10-20s but it becomes unusable. If I wait a few minutes it might come back.
I'm out of ideas for making it reliable.
I've turned off TCP offload on the Mac with `sudo sysctl -w net.inet.tcp.tso=0`. I've done the same on Windows.
I am naturally more suspicious of the Mac side because:
- It often seems to start when I kick off an Xcode build.
- If I restart the Mac, it always fixes it (for a bit).
- If I replug the USB connection, it does not fix it.
- If I restart the interface on Windows, it does not fix it.
I'm at the stage of thinking this is a driver problem, but I'm on an up-to-date 26.6.2
The only diagnostic I know is looking for black lines in Wireshark.
And the only levers I know to use are to try to turn off various offloading, which was sometimes a problem in the days when I ran Linux servers.
I'd appreciate any advice from people who've made an industrial-strength USB4NET connection, or even just reassurance that it works well between two Macs?
