iperf: connecting to remote server consistently faster than local network

0

So I turned my old laptop into a home server. Both the server (old laptop) and my main machine are connected to the same router wirelessly. Both are running Ubuntu 18.04. Everything seemed to work fine until I decided to test network speed.

Using iperf3 connecting to my main machine from the server I get ~13Mbps. That's a little low even considering that the server only supports 802.11g, but that's the same speed I get when transferring files over SFTP.

What's really surprising tho is that connecting to remote (public) iperf3 servers I consistently get ~20Mbps.

I don't know much about networking so I have no clue what could be causing this. How can I "fix" my server/network so I get better speeds?

Ozymandias

Posted 2018-07-13T10:36:10.687

Reputation: 3

Answers

3

Wi-Fi is half-duplex. Additionally, clients talk only to the access point, not directly with each other.

So as I understand it: When both hosts are on the same AP, for every packet there's a period of time when the AP receives packets from the client, and a period of time when the AP sends the same packets to the server. (Or the other way around if you use iperf3 -R.) As a result the transfer takes twice the air-time to reach its destination.

user1686

Posted 2018-07-13T10:36:10.687

Reputation: 283 655

Agree with @grawity - When two wireless stations are on the same radio/channel you'll get 50% of the TCP throughput. The best way to test this is:

WiredPC1--------Router ((( )))WirelessPC2 -

Run iPerf server on WirelessPC2 and iPerf client on the WiredPC1. This way, you'll be testing downstream, which is always best when you do measurement testing. If you're wirelessPC2 is 802.11g, in a good RF environment, you should expect approx. 25-26Mbps – pythonian – 2018-07-13T18:21:09.043

1Sorry for the delay. So I finally tried @pythonian 's suggestion and the results I'm seeing are off by just ~2Mbps, probably interference. Thank you, marking this as accepted. – Ozymandias – 2018-07-23T18:15:14.953