NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
OMAP Wireless Connectivity AM37x WLAN Throughput Measurement
Contents
Purpose[edit]
This section will cover the following items:
- Setting the CPU clock
- Throughput Measurement
- CPU utilization Measurement
iperf application for PC: media:iperf.zip
Setting CPU Clock[edit]
For more information about this test refer to <CPU Clock Setup>.
Listing the available frequencies
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Setting the AM18x EVM frequency to 456 MHz
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
Querying the CPU frequency
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
Throughput Measurement[edit]
Introduction to TCP and UDP[edit]
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP. TCP provides reliable, ordered delivery of a stream of bytes from a program on one computer to another program on another computer.
For further information regarding TCP, refer to Transmission Control Protocol.
The User Datagram Protocol (UDP) is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths. UDP is considered unreliable protocol.
For further information regarding UDP, refer to User Datagram Protocol.
Measurement Tools - Iperf[edit]
Iperf was developed as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.
Iperf can run as a client or as a server according to the arguments passed to it. Unlike NetPerf, when using Iperf we need to configure both client and server sides.
TCP/UDP Throughput Measurements[edit]
After reading the Measurement Tools section above, we are ready to go on to do the various tests.
We have the following setup for testing the throughput:
Where one EVM is configured as station and the other one is configured as AP. The stations are connected via WLAN.
AP Configuration[edit]
We begin with configuring the first EVM to wok as AP according to the following link: Non Secure AP. Follow steps 1 to 3 only.
Station Configuration[edit]
We configure the second EVM to be a station using the following commands:
ifconfig wlan0 up
This commands powers on the wireless LAN interface.
The expected result is:
root@am37x-evm:~# ifconfig wlan0 up [ 100.004913] wl1271: firmware booted (Rev 6.1.5.50.69)
Now we connect the AP we previously configured using the following command:
iw wlan0 connect <AP Name>
The expected result is:
root@am37x-evm:~# iw wlan0 connect AM37xAP [ 109.568054] wlan0: authenticate with 00:16:b6:da:29:3c (try 1) [ 109.579162] wlan0: authenticated [ 109.669647] wlan0: associate with 00:16:b6:da:29:3c (try 1) [ 109.680572] wlan0: RX AssocResp from 00:16:b6:da:29:3c (capab=0x401 status=0 aid=5) [ 109.688629] wlan0: associated [ 109.726043] wl1271: Association completed.
Now, we obtain an IP address from the AP DHCP server with the command:
udhcpc -i wlan0
The expected result is:
root@am37x-evm:~# udhcpc -i wlan0 udhcpc (v1.13.2) started Sending discover... Sending select for 192.168.1.111... Lease of 192.168.1.111 obtained, lease time 60 adding dns 10.0.0.138
Now, we can perform one of the tests below:
Hands On - Throughput Tests[edit]
For the following tests, we will set the EVMs to be in active mode in order to get better throughput results.
For that, we need to invoke the following command:
iw wlan0 set power_save off
TCP Upstream Test using Iperf[edit]
Server side:
iperf -s -i2 -p5001
Expected result:
------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.0.21 port 5001 connected with 192.168.0.1 port 33764 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 2.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 2.0- 4.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 4.0- 6.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 6.0- 8.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 8.0-10.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 10.0-12.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 12.0-14.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 14.0-16.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 16.0-18.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 18.0-20.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 0.0-20.0 sec 49.9 MBytes 20.9 Mbits/sec
Note:
- The result will be shown after the client is activated.
- The Iperf supplies faulty result for TCP test (0.00 bits/sec) on server side only.
Client side:
iperf -c <Server IP> -t20 -i2 -w64k -p5001
Expected result:
------------------------------------------------------------ Client connecting to 192.168.0.21, TCP port 5001 TCP window size: 128 KByte (WARNING: requested 64.0 KByte) ------------------------------------------------------------ [ 3] local 192.168.0.1 port 33764 connected with 192.168.0.21 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 2.0 sec 5.09 MBytes 21.3 Mbits/sec [ 3] 2.0- 4.0 sec 5.06 MBytes 21.2 Mbits/sec [ 3] 4.0- 6.0 sec 5.02 MBytes 21.0 Mbits/sec [ 3] 6.0- 8.0 sec 4.98 MBytes 20.9 Mbits/sec [ 3] 8.0-10.0 sec 4.89 MBytes 20.5 Mbits/sec [ 3] 10.0-12.0 sec 5.02 MBytes 21.1 Mbits/sec [ 3] 12.0-14.0 sec 4.99 MBytes 20.9 Mbits/sec [ 3] 14.0-16.0 sec 4.90 MBytes 20.5 Mbits/sec [ 3] 16.0-18.0 sec 5.02 MBytes 21.0 Mbits/sec [ 3] 18.0-20.0 sec 4.92 MBytes 20.6 Mbits/sec [ 3] 0.0-20.0 sec 49.9 MBytes 20.9 Mbits/sec
Calculating the WLAN utilization for TCP Upstream Test using Iperf[edit]
This test can provide indication about the wireless overhead on the EVM.
For more information about this test refer to <CPU Utilization>.
In order to calculate the WLAN Utilization for TCP upstream, we will invoke the same client command as a process and discard its prints:
iperf -c <Server IP> -t20 -i2 -w64k -p5001 > /dev/null &
The "> /dev/null" means dumping the application output to /dev/null which is basically eliminating the application output.
After invoking the client as process, invoke the command:
top
The 'top' command will refresh the screen each few seconds. The 'top' command will show the %idle of the CPU and the iperf consumption of the CPU.
Mem: 102696K used, 139456K free, 0K shrd, 10036K buff, 44076K cached CPU: 0% usr 22% sys 0% nic 73% idle 0% io 0% irq 3% sirq Load average: 0.16 0.08 0.10 1/79 2370 PID PPID USER STAT VSZ %MEM %CPU COMMAND 1160 2 root DW 0 0% 17% [irq/309-wl1271] 7 2 root RW 0 0% 6% [kworker/u:1] 2365 2284 root S 19576 8% 2% iperf -c 192.168.0.21 -t20 -i2 -w64k - 3 2 root SW 0 0% 1% [ksoftirqd/0] 2323 1 root S 4608 2% 0% hostapd -B /etc/hostapd.conf -P /var/r 2368 2284 root R 2856 1% 0% top 2245 1 root S 51288 21% 0% /usr/bin/matrix_guiE -qws -display tra 2096 1 haldaemo S 13116 5% 0% /usr/sbin/hald 2137 2097 root S 3380 1% 0% /usr/libexec/hald-addon-cpufreq 2111 2097 root S 3368 1% 0% /usr/libexec/hald-addon-rfkill-killswi 2112 2097 root S 3368 1% 0% hald-addon-input: Listening on /dev/in 2108 2097 root S 3364 1% 0% /usr/libexec/hald-addon-omap-backlight 2109 2097 root S 3364 1% 0% /usr/libexec/hald-addon-generic-backli 2092 1 messageb S 3316 1% 0% /usr/bin/dbus-daemon --system 2097 2096 root S 3276 1% 0% hald-runner 2284 2251 root S 2856 1% 0% -sh 2169 1 root S 2740 1% 0% /sbin/syslogd -n -C64 -m 20 2052 1 root S 2680 1% 0% udhcpc -R -b -p /var/run/udhcpc.eth0.p 2171 1 root S 2676 1% 0% /sbin/klogd -n 2157 1 root S 2676 1% 0% /usr/sbin/telnetd
Here you can see: idle = 73%, iperf = 2%.
You need to calculate the WLAN utilization as follows:
WLAN Utilization = 100 - (%idle + %iperf)
In our example: WLAN Utilization = 100 - (73 +2) = 25%.
Do the calculation three times to have a reasonable average. You need to disregard the first 'top' snapshot as it displays faulty values.
Note
TCP Downstream Test using Iperf[edit]
Server side:
iperf -s -i2 -p5001
Expected result:
------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.0.21 port 5001 connected with 192.168.0.1 port 33764 [ ID] Interval Transfer Bandwidth [ 4] 0.0- 2.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 2.0- 4.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 4.0- 6.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 6.0- 8.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 8.0-10.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 10.0-12.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 12.0-14.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 14.0-16.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 16.0-18.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 18.0-20.0 sec 0.00 Bytes 0.00 bits/sec [ 4] 0.0-20.0 sec 49.9 MBytes 20.9 Mbits/sec
Note:
- The result will be shown after the client is activated.
- The Iperf supplies faulty result for TCP test (0.00 bits/sec) on server side only.
Client side:
iperf -c <Server IP> -t20 -i2 -w64k -p5001
Expected result:
------------------------------------------------------------ Client connecting to 192.168.0.21, TCP port 5001 TCP window size: 128 KByte (WARNING: requested 64.0 KByte) ------------------------------------------------------------ [ 3] local 192.168.0.1 port 33764 connected with 192.168.0.21 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 2.0 sec 5.09 MBytes 21.3 Mbits/sec [ 3] 2.0- 4.0 sec 5.06 MBytes 21.2 Mbits/sec [ 3] 4.0- 6.0 sec 5.02 MBytes 21.0 Mbits/sec [ 3] 6.0- 8.0 sec 4.98 MBytes 20.9 Mbits/sec [ 3] 8.0-10.0 sec 4.89 MBytes 20.5 Mbits/sec [ 3] 10.0-12.0 sec 5.02 MBytes 21.1 Mbits/sec [ 3] 12.0-14.0 sec 4.99 MBytes 20.9 Mbits/sec [ 3] 14.0-16.0 sec 4.90 MBytes 20.5 Mbits/sec [ 3] 16.0-18.0 sec 5.02 MBytes 21.0 Mbits/sec [ 3] 18.0-20.0 sec 4.92 MBytes 20.6 Mbits/sec [ 3] 0.0-20.0 sec 49.9 MBytes 20.9 Mbits/sec
For WLAN Utilization measurement, refer to WLAN Utilization for TCP Upstream above.
UDP Upstream Test using Iperf[edit]
Server side:
iperf -s -u -i2 -p5001
Expected Result:
------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.21 port 5001 connected with 192.168.0.1 port 60528 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 3] 0.0- 2.0 sec 5.73 MBytes 24.0 Mbits/sec 1.718 ms 0/ 4088 (0%) [ 3] 2.0- 4.0 sec 5.74 MBytes 24.1 Mbits/sec 1.197 ms 0/ 4092 (0%) [ 3] 4.0- 6.0 sec 5.74 MBytes 24.1 Mbits/sec 0.743 ms 0/ 4091 (0%) [ 3] 6.0- 8.0 sec 5.64 MBytes 23.6 Mbits/sec 0.951 ms 0/ 4021 (0%) [ 3] 8.0-10.0 sec 5.60 MBytes 23.5 Mbits/sec 1.871 ms 0/ 3993 (0%) [ 3] 10.0-12.0 sec 5.67 MBytes 23.8 Mbits/sec 1.498 ms 0/ 4044 (0%) [ 3] 12.0-14.0 sec 5.73 MBytes 24.0 Mbits/sec 1.242 ms 0/ 4086 (0%) [ 3] 14.0-16.0 sec 5.73 MBytes 24.0 Mbits/sec 0.588 ms 0/ 4085 (0%) [ 3] 16.0-18.0 sec 5.73 MBytes 24.0 Mbits/sec 0.640 ms 0/ 4089 (0%) [ 3] 18.0-20.0 sec 5.74 MBytes 24.1 Mbits/sec 1.850 ms 0/ 4091 (0%) [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec 1.341 ms 0/40741 (0%) [ 3] 0.0-20.0 sec 1 datagrams received out-of-order
Note: The result will be shown after the client is activated.
Client side:
iperf -c <Server IP> -t20 -u -i2 -b52M -p5001
Expected result:
------------------------------------------------------------ Client connecting to 192.168.0.21, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.1 port 60528 connected with 192.168.0.21 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 2.0 sec 5.80 MBytes 24.3 Mbits/sec [ 3] 2.0- 4.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 4.0- 6.0 sec 5.76 MBytes 24.2 Mbits/sec [ 3] 6.0- 8.0 sec 5.62 MBytes 23.6 Mbits/sec [ 3] 8.0-10.0 sec 5.59 MBytes 23.4 Mbits/sec [ 3] 10.0-12.0 sec 5.70 MBytes 23.9 Mbits/sec [ 3] 12.0-14.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 14.0-16.0 sec 5.71 MBytes 23.9 Mbits/sec [ 3] 16.0-18.0 sec 5.72 MBytes 24.0 Mbits/sec [ 3] 18.0-20.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec [ 3] Sent 40742 datagrams [ 3] Server Report: [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec 1.340 ms 0/40741 (0%) [ 3] 0.0-20.0 sec 1 datagrams received out-of-order
For WLAN Utilization measurement, refer to WLAN Utilization for TCP Upstream above.
UDP Downstream Test using Iperf[edit]
Server side:
iperf -s -u -i2 -p5001
Expected Result:
------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.21 port 5001 connected with 192.168.0.1 port 60528 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 3] 0.0- 2.0 sec 5.73 MBytes 24.0 Mbits/sec 1.718 ms 0/ 4088 (0%) [ 3] 2.0- 4.0 sec 5.74 MBytes 24.1 Mbits/sec 1.197 ms 0/ 4092 (0%) [ 3] 4.0- 6.0 sec 5.74 MBytes 24.1 Mbits/sec 0.743 ms 0/ 4091 (0%) [ 3] 6.0- 8.0 sec 5.64 MBytes 23.6 Mbits/sec 0.951 ms 0/ 4021 (0%) [ 3] 8.0-10.0 sec 5.60 MBytes 23.5 Mbits/sec 1.871 ms 0/ 3993 (0%) [ 3] 10.0-12.0 sec 5.67 MBytes 23.8 Mbits/sec 1.498 ms 0/ 4044 (0%) [ 3] 12.0-14.0 sec 5.73 MBytes 24.0 Mbits/sec 1.242 ms 0/ 4086 (0%) [ 3] 14.0-16.0 sec 5.73 MBytes 24.0 Mbits/sec 0.588 ms 0/ 4085 (0%) [ 3] 16.0-18.0 sec 5.73 MBytes 24.0 Mbits/sec 0.640 ms 0/ 4089 (0%) [ 3] 18.0-20.0 sec 5.74 MBytes 24.1 Mbits/sec 1.850 ms 0/ 4091 (0%) [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec 1.341 ms 0/40741 (0%) [ 3] 0.0-20.0 sec 1 datagrams received out-of-order
Note: The result will be shown after the client is activated.
Client side:
iperf -c <Server IP> -t20 -u -i2 -b52M -p5001
Expected result:
------------------------------------------------------------ Client connecting to 192.168.0.21, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.1 port 60528 connected with 192.168.0.21 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0- 2.0 sec 5.80 MBytes 24.3 Mbits/sec [ 3] 2.0- 4.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 4.0- 6.0 sec 5.76 MBytes 24.2 Mbits/sec [ 3] 6.0- 8.0 sec 5.62 MBytes 23.6 Mbits/sec [ 3] 8.0-10.0 sec 5.59 MBytes 23.4 Mbits/sec [ 3] 10.0-12.0 sec 5.70 MBytes 23.9 Mbits/sec [ 3] 12.0-14.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 14.0-16.0 sec 5.71 MBytes 23.9 Mbits/sec [ 3] 16.0-18.0 sec 5.72 MBytes 24.0 Mbits/sec [ 3] 18.0-20.0 sec 5.74 MBytes 24.1 Mbits/sec [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec [ 3] Sent 40742 datagrams [ 3] Server Report: [ 3] 0.0-20.0 sec 57.1 MBytes 23.9 Mbits/sec 1.340 ms 0/40741 (0%) [ 3] 0.0-20.0 sec 1 datagrams received out-of-order
For WLAN Utilization measurement, refer to WLAN Utilization for TCP Upstream above.