Open StraightfaceStudios opened 1 year ago
A workaround for this may also be to disable the MultiChannel feature:
Set-SmbServerConfiguration -EnableMultiChannel $false
Set-SmbClientConfiguration -EnableMultiChannel $false
This may also require a reboot of the device.
Achieving multi-gig speeds without multichannel would be unlikely. Multichannel doesn't just use multiple paths it also uses multiple threaded transfers on the same connection.
If you set the above when you are using subnet, it is not possible if the user is actually using multi-channel. Is there any other way to prevent this on the tailscale?
What is the issue?
SMB Multichannel teams together multiple logical interfaces to increase throughput to devices.
If you set a subnet route to localsubnet/(subnetmask-1) Windows will correctly prioritize the LAN route vs the subnet route. However since SMB Multichannel uses ALL available routes, in its list of multichannel IPs it will attempt to use both the LAN route and the SUBNET route to "increase throughput" to the same destination.
The result is that all network transfers will use both interfaces and be throttled by the slowest available path for the round-robin packet transfers.
3gbps transfers slow down to ~1gbps because it'll go: 1) LAN1 > Destination1 [1gbps] 2) TAILSCALE > Destination1 [200mbps] [WAIT] 3) LAN1 > Destination 2 4) TAILSCALE > Destination 2 [WAIT] 5) ... etc
Workaround: Disable Subnets for LAN clients in the subnet.
Discussion: It's possibly also related to Tailscale reporting itself as a 100gbe connection. Windows might look at the advertised link speed and say "This should be the fastest link." and allocate speed accordingly.
Steps to reproduce
1) Install tailscale on a Windows client 192.168.0.1/24. 2) Setup a Subnet Router on the Windows Client's LAN with wider scope e.g. 192.168.0.0/23. 3) Setup a server with an SMB Multichannel share (Specifically in this case a Synology using the Beta Multichannel Samba build but it shouldn't matter) with multiple IPs. 4) Copy a file to the Windows Client.
Result: ~1.4gbps transfer
5) Disable Subnet Routes on LAN client.
Result: ~2.5gbps transfer
Are there any recent changes that introduced the issue?
No response
OS
Linux, Windows, Synology
OS version
Windows Server 2022 (client), Synology DSM 7.1 w/ Multichannel (Server)
Tailscale version
1.32.2
Bug report
BUG-61af5b6ee5db76de2318217f63b0d4d65455a4e05742af53cc2864f74aac98a6-20230118192823Z-33b37f6701db68a6