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 CPU Utilization

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

In this section we will check the CPU utilization during wireless traffic.
This test can provide indication about the wireless overhead on the EVM.

Test Description[edit]

For this test we need to do the following steps:

  • Connect the EVM to some AP.
  • Initiate wireless traffic between the EVM and the AP.
  • Monitor the CPU usage and other parameters while the traffic is running.

We have already had a setup for the first two bullets in the Performance measurement setup section.
What left to do for us is monitoring the CPU during the wireless traffic. This will be done using 'top' command as will be explained later on.

Test Implementation[edit]

Let's start with checking the CPU utilization for TCP upstream test. After that you can do the rest of the tests (TCP Downstream / UDP Upstream / etc...) in the same manner.
One minor change in the setup is adding some options when activating the client:
For Iperf:

iperf -c 192.168.1.109 -t20 -i2 -w64k -p5001 > /dev/null &


For NetPerf:

netperf -H 192.168.1.109 -D 2 -l 20 -t TCP_STREAM -f m -- -m 1472 -s64k -S64k > /dev/null &


We run the process as a daemon (&) in order to be able to run other tasks simultaneously. The "> /dev/null" is used to get rid of the client output information.

Before we start the client, we would like to be ready to monitor the traffic and capture the CPU consumption for time to time. We do that by capturing the CPU consumption status from the console several times as follows:

Assuming you are using Windows HyperTerminal, we do the following:

  1. Start the iperf client as mentioned before.
  2. issue 'top' command on the EVM.
  3. In the HyperTerminal go to 'Transfer' -> 'Capture Text' (You can see there the destination of the captured file).
  4. Hit the 'Start' button to start capturing the CPU status during the wireless traffic.

Note that you can enlarge the wireless time slot by changing the '-t' parameter in the iperf client command.
The console will show something like:

JMem: 57176K used, 3076K free, 0K shrd, 2000K buff, 39692K cached
CPU:   2% usr  91% sys   0% nic   6% idle   0% io   0% irq   0% sirq
Load average: 0.57 0.29 0.18 3/69 1010
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
  443     2 root     SW       0   0%  29% [irq/207-wl1271]
 1007   740 root     S    19764  33%  23% iperf -c 10.0.0.4 -t40 -i2 -w64k -p500
  835     2 root     SW       0   0%  12% [kworker/u:2]
 1004     2 root     SW       0   0%  12% [kworker/0:2]
  916     2 root     RW       0   0%  12% [kworker/u:0]
   28     2 root     SW       0   0%   5% [kworker/u:1]
 1010   740 root     R     3036   5%   1% top 
  917     2 root     SW       0   0%   0% [kworker/u:3]
  613     1 root     S     2864   5%   0% udhcpc -R -b -p /var/run/udhcpc.eth0.p
    3     2 root     SW       0   0%   0% [ksoftirqd/0]
  723     1 root     S    48020  80%   0% /usr/bin/matrix_guiE -qws -display tra
  655     1 haldaemo S    12940  21%   0% /usr/sbin/hald 
  750     1 root     S     4536   8%   0% wpa_supplicant -d -Dnl80211 -c/etc/wpa
  651     1 messageb S     3332   6%   0% /usr/bin/dbus-daemon --system 
  680   656 root     S     3300   5%   0% /usr/libexec/hald-addon-cpufreq 
  669   656 root     S     3288   5%   0% hald-addon-input: Listening on /dev/in
  668   656 root     S     3284   5%   0% /usr/libexec/hald-addon-rfkill-killswi
  656   655 root     S     3192   5%   0% hald-runner 
  740   729 root     S     3036   5%   0% -sh 
  706     1 root     S     2924   5%   0% /sbin/syslogd -n -C64 -m 20

The parameters that matter to us are:

  • CPU Idle percentage
  • In line with the 'iperf' command that we issued (second task line in our example), we want the '%CPU' field, which is 23% in our example.

Once you have three or more different screenshots as the above, you can stop the capturing in the HyperTerminal by going to 'Transfer' -> 'Capture Text' and hit the 'Stop' button.
Now you have the different captures inside the file mentioned when you started the capturing.

CPU Utilization Calculation[edit]

Now that we have the captures in hand, the utilization is done according to the formula:
CPU Utilization = (CPU Utilization Sample 1 + CPU Utilization Sample 2 + CPU Utilization Sample 3) / 3.
Where: CPU Utilization Sample = 100% - (CPU Idle %) - (%CPU of iperf).
In this example, we took three samples. Of course, the higher samples number we take, the higher accuracy we get about CPU Utilization.

Actual Example[edit]

Assume we have three inputs in hand as follows:

Item Sample 1 Sample 2 Sample 3
%Idle 2% 3% 5%
%CPU for Iperf 23% 27% 26%


Let's calculate the CPU utilization for each sample:
Sampe 1 = (100 - 2 - 23) = 75%.
Sampe 2 = (100 - 3 - 27) = 70%.
Sampe 3 = (100 - 5 - 26) = 69%.
CPU Utilization would be: (75 + 70 + 69) / 3 = 71.33%

HomepageIcon.jpgHOME

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP Wireless Connectivity CPU Utilization here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article OMAP Wireless Connectivity CPU Utilization here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article OMAP Wireless Connectivity CPU Utilization here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity