Slow speed between two nodes in same network

Tailscale version1.22.1
Your operating system & version Linux weather 5.10.103-v8+ #1530 SMP PREEMPT Tue Mar 8 13:06:35 GMT 2022 aarch64
I have two Pi machines I’m using for this test. They are both uptodate. They are both plugged into the same gigabit switch. I have run iperf between the two machines using both the native (local) IP address and the TailScale address. The difference in performance is 180 Mbits/sec for TailScale and 935 Mbits/sec for native.

tailscale status shows this

100.71.37.59    gateway              charles@     linux   active; direct 172.83.171.98:41649, tx 238508 rx 396612
100.124.58.25   weather              charles@     linux   active; direct 192.168.2.254:41641, tx 1096 rx 952

Here is iperf results

[ 4] local 100.124.58.25 port 5001 connected with 100.71.37.59 port 58554
[ ID] Interval Transfer Bandwidth
[ 4] 0.0000-10.0232 sec 215 MBytes 180 Mbits/sec
[ 5] local 192.168.2.254 port 5001 connected with 192.168.2.184 port 60344
[ ID] Interval Transfer Bandwidth
[ 5] 0.0000-10.0260 sec 1.09 GBytes 935 Mbits/sec

what can I do to improve this?

I’ve run similar tests, with bare wireguard, and with tailscale. It looks like it’s bottlenecking on the CPU. Each packet has to be encrypted. My pi zero has significantly lower bandwidth than my pi4, and during large transfers, the CPU is running at 100%.

Interesting. I’m running under stressed Pi 4 s. I’ll check.