2.9. Linux Performance#

Overview

It is important to compare the performance of critical tasks to make sure that the tasks will meet the design goals of an embedded system. For example, if the target is a gateway application, then it is important to evaluate whether a potential solution will meet the overall ethernet bandwidth required by the gateway application. The combination of the Processor SDK for Linux and a TI EVM provides a powerful evaluation platform, especially for common interfaces (e.g., Ethernet in the above gateway application).

The Processor SDK for Linux includes many building blocks to help in the evaluation phase. The fact that Linux boots on a known good platform like an EVM is already a great start. From a Linux prompt, many tools and applications can be employed from Linux to test the underlying hardware. For example, the SDK provides many benchmarking suites (e.g., lmbench, stream, etc.) as part of the target filesystems.

For example, if memory bandwidth is of interest, the following command can be run on an EVM right out of the box:

# bw_mem 8M cp
8.00 451.65

Note

Please note the command is being run from /usr/bin on the target, an AM62x Starter Kit (SK).

These benchmarks can be useful to compare performance on hardware platforms. For example, the TI EVMs can be compared to custom hardware as a point of reference in board validation. If a custom board designed to meet the same specifications as an EVM shows lower performance than the EVM, then it may be a good idea to evaluate the custom board design before proceeding further into the design process.

Matrix Demo

The Matrix Demo provides easy access to many standard benchmarks. All of these examples can be run on the target with a few clicks of the mouse. In the example below, opening the “ARM” menu on the home page shows a variety of benchmarks that can be executed by clicking on different icons.

../_images/Academy_Matrix_ARM.png

Here is what is displayed by clicking the “DDR Bandwidth” icon:

../_images/Academy_Matrix_ARM_DDR_Bandwidth.png

When the “run” icon is clicked above, a script is executed on the target. In order to find the script, take a look at the Matrix GUI desktop file:

# cat /usr/share/matrix-gui-2.0/apps/arm_ddr_bandwidth/arm_ddr_bandwidth.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=DDR Bandwidth
GenericName=Benchmark
Icon=/usr/share/matrix-gui-2.0/apps/images/arm-icon.png
Type=Application
Exec=optimize-benchmark.sh runLmDDRBandwidth.sh
Categories=arm
ProgramType=console
X-MATRIX-Lock=benchmarks
X-MATRIX-Description=/usr/share/matrix-gui-2.0/apps/arm_ddr_bandwidth/desc_arm_ddr_bandwidth.html

The script that runs when this icon is clicked is pointed to by the “Exec” statement above. The optimize-benchmark.sh and runLmDDRBandwidth.sh scripts are located in /usr/bin directory on the target. These scripts serve as good examples of what can be done directly using the Processor SDK and an EVM.