WiFi throughput performance using (u)iperf3

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

WiFi throughput performance using (u)iperf3

Post by Damien » Wed Apr 03, 2019 8:25 am

To test WiFi throughput on the PYBD as it was being developed, I wrote a Python module implementing the iperf3 protocol. It's on PyPI as uiperf3 and can be installed on a PYBD using upip.install('uiperf3').

To test performance, run normal iperf3 on your PC in server mode (iperf3 -s) and then on the PYBD use:

Code: Select all

import uiperf3
uiperf3.client("ip-of-PC")
Client mode supports the "reverse" and "udp" keyword args to select different modes (it defaults to TCP sending), and "bandwidth" in bits per second. It also supports server mode via uiperf3.server().

Throughput is heavily dependent on how much traffic is already on the WLAN, and also other environmental (physical) factors. Here is a typical output trace running on a PYBD_SF2W:

Code: Select all

>>> uiperf3.client('192.168.1.221')
CLIENT MODE: TCP sending
Connecting to ('192.168.1.221', 5201)
Interval           Transfer     Bitrate
  0.00-1.00   sec   902 KBytes  7.38 Mbits/sec
  1.00-2.00   sec   929 KBytes  7.61 Mbits/sec
  2.00-3.00   sec   958 KBytes  7.85 Mbits/sec
  3.00-4.00   sec  0.98 MBytes  8.21 Mbits/sec
  4.00-5.00   sec   991 KBytes  8.11 Mbits/sec
  5.00-6.00   sec   911 KBytes  7.46 Mbits/sec
  6.00-7.00   sec   953 KBytes  7.80 Mbits/sec
  7.00-8.00   sec   920 KBytes  7.53 Mbits/sec
  8.00-9.00   sec   941 KBytes  7.71 Mbits/sec
  9.00-10.00  sec   923 KBytes  7.56 Mbits/sec
 10.00-10.00  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  0.00-10.00  sec  9.21 MBytes  7.72 Mbits/sec  sender
  0.00-11.26  sec  9.21 MBytes  6.86 Mbits/sec  receiver
>>> uiperf3.client('192.168.1.221', reverse=1)
CLIENT MODE: TCP receiving
Connecting to ('192.168.1.221', 5201)
Interval           Transfer     Bitrate
  0.00-1.00   sec   870 KBytes  7.13 Mbits/sec
  1.00-2.01   sec   873 KBytes  7.12 Mbits/sec
  2.01-3.01   sec   782 KBytes  6.38 Mbits/sec
  3.01-4.01   sec   806 KBytes  6.60 Mbits/sec
  4.01-5.01   sec   771 KBytes  6.30 Mbits/sec
  5.01-6.01   sec   817 KBytes  6.68 Mbits/sec
  6.01-7.02   sec   858 KBytes  7.03 Mbits/sec
  7.02-8.02   sec   835 KBytes  6.82 Mbits/sec
  8.02-9.02   sec   867 KBytes  7.08 Mbits/sec
  9.02-10.00  sec   829 KBytes  6.93 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  0.00-10.00  sec  8.11 MBytes  6.80 Mbits/sec  sender
  0.00-10.41  sec  8.51 MBytes  6.85 Mbits/sec  receiver

User avatar
cccc
Posts: 2
Joined: Thu Feb 13, 2020 3:26 am

Re: WiFi throughput performance using (u)iperf3

Post by cccc » Sat Feb 15, 2020 7:58 pm

use it at esp8266 port, and end up with a error below:
https://imgur.com/a/NVwWAzq

Post Reply