2.2. Performance Guide

2.2.1. RT Kernel Performance Guide

Read This First

All performance numbers provided in this document are gathered using following Evaluation Modules unless otherwise specified.

Name

Description

AM65x EVM

AM65x Evaluation Module rev 1.0 with ARM running at 800MHz, DDR4-2400 (1600 MT/S), TMDX654GPEVM

Table: Evaluation Modules


About This Manual

This document provides performance data for each of the device drivers which are part of the Process SDK Linux package. This document should be used in conjunction with release notes and user guides provided with the Process SDK Linux package for information on specific issues present with drivers included in a particular release.

If You Need Assistance

For further information or to report any problems, contact http://e2e.ti.com/ or http://support.ti.com/

2.2.1.1. System Benchmarks

2.2.1.1.1. LMBench

LMBench is a collection of microbenchmarks of which the memory bandwidth and latency related ones are typically used to estimate processor memory system performance. More information about lmbench at http://lmbench.sourceforge.net/whatis_lmbench.html and http://lmbench.sourceforge.net/man/lmbench.8.html

Latency: lat_mem_rd-stride128-szN, where N is equal to or smaller than the cache size at given level measures the cache miss penalty. N that is at least double the size of last level cache is the latency to external memory.

Bandwidth: bw_mem_bcopy-N, where N is is equal to or smaller than the cache size at a given level measures the achievable memory bandwidth from software doing a memcpy() type operation. Typical use is for external memory bandwidth calculation. The bandwidth is calculated as byte read and written counts as 1 which should be roughly half of STREAM copy result.

Benchmarks

am654x-evm: perf

af_unix_sock_stream_latency (microsec)

60.45

af_unix_socket_stream_bandwidth (MBs)

1119.71

bw_file_rd-io-1mb (MB/s)

976.37

bw_file_rd-o2c-1mb (MB/s)

524.38

bw_mem-bcopy-16mb (MB/s)

878.64

bw_mem-bcopy-1mb (MB/s)

1033.77

bw_mem-bcopy-2mb (MB/s)

882.35

bw_mem-bcopy-4mb (MB/s)

871.84

bw_mem-bcopy-8mb (MB/s)

882.03

bw_mem-bzero-16mb (MB/s)

1649.99

bw_mem-bzero-1mb (MB/s)

2682.56 (min 1033.77, max 4331.35)

bw_mem-bzero-2mb (MB/s)

1607.26 (min 882.35, max 2332.17)

bw_mem-bzero-4mb (MB/s)

1292.58 (min 871.84, max 1713.31)

bw_mem-bzero-8mb (MB/s)

1263.72 (min 882.03, max 1645.41)

bw_mem-cp-16mb (MB/s)

590.80

bw_mem-cp-1mb (MB/s)

2613.87 (min 673.17, max 4554.56)

bw_mem-cp-2mb (MB/s)

1464.26 (min 589.10, max 2339.41)

bw_mem-cp-4mb (MB/s)

1145.11 (min 584.45, max 1705.76)

bw_mem-cp-8mb (MB/s)

1121.70 (min 596.79, max 1646.60)

bw_mem-fcp-16mb (MB/s)

820.81

bw_mem-fcp-1mb (MB/s)

2647.84 (min 964.32, max 4331.35)

bw_mem-fcp-2mb (MB/s)

1576.60 (min 821.02, max 2332.17)

bw_mem-fcp-4mb (MB/s)

1265.70 (min 818.08, max 1713.31)

bw_mem-fcp-8mb (MB/s)

1235.97 (min 826.53, max 1645.41)

bw_mem-frd-16mb (MB/s)

1285.66

bw_mem-frd-1mb (MB/s)

1262.35 (min 964.32, max 1560.37)

bw_mem-frd-2mb (MB/s)

1076.85 (min 821.02, max 1332.67)

bw_mem-frd-4mb (MB/s)

1057.24 (min 818.08, max 1296.39)

bw_mem-frd-8mb (MB/s)

1048.89 (min 826.53, max 1271.25)

bw_mem-fwr-16mb (MB/s)

1647.45

bw_mem-fwr-1mb (MB/s)

3057.47 (min 1560.37, max 4554.56)

bw_mem-fwr-2mb (MB/s)

1836.04 (min 1332.67, max 2339.41)

bw_mem-fwr-4mb (MB/s)

1501.08 (min 1296.39, max 1705.76)

bw_mem-fwr-8mb (MB/s)

1458.93 (min 1271.25, max 1646.60)

bw_mem-rd-16mb (MB/s)

1303.04

bw_mem-rd-1mb (MB/s)

2888.16 (min 2624.67, max 3151.65)

bw_mem-rd-2mb (MB/s)

1163.58 (min 914.22, max 1412.93)

bw_mem-rd-4mb (MB/s)

1033.24 (min 755.43, max 1311.05)

bw_mem-rd-8mb (MB/s)

1024.03 (min 741.29, max 1306.76)

bw_mem-rdwr-16mb (MB/s)

730.96

bw_mem-rdwr-1mb (MB/s)

1818.07 (min 673.17, max 2962.96)

bw_mem-rdwr-2mb (MB/s)

742.25 (min 589.10, max 895.39)

bw_mem-rdwr-4mb (MB/s)

663.63 (min 584.45, max 742.80)

bw_mem-rdwr-8mb (MB/s)

664.87 (min 596.79, max 732.94)

bw_mem-wr-16mb (MB/s)

742.25

bw_mem-wr-1mb (MB/s)

3057.31 (min 2962.96, max 3151.65)

bw_mem-wr-2mb (MB/s)

904.81 (min 895.39, max 914.22)

bw_mem-wr-4mb (MB/s)

749.12 (min 742.80, max 755.43)

bw_mem-wr-8mb (MB/s)

737.12 (min 732.94, max 741.29)

bw_mmap_rd-mo-1mb (MB/s)

2540.83

bw_mmap_rd-o2c-1mb (MB/s)

537.35

bw_pipe (MB/s)

320.24

bw_unix (MB/s)

1119.71

lat_connect (us)

105.29

lat_ctx-2-128k (us)

7.47

lat_ctx-2-256k (us)

5.66

lat_ctx-4-128k (us)

7.50

lat_ctx-4-256k (us)

3.26

lat_fs-0k (num_files)

147.00

lat_fs-10k (num_files)

63.00

lat_fs-1k (num_files)

108.00

lat_fs-4k (num_files)

92.00

lat_mem_rd-stride128-sz1000k (ns)

27.49

lat_mem_rd-stride128-sz125k (ns)

9.77

lat_mem_rd-stride128-sz250k (ns)

10.22

lat_mem_rd-stride128-sz31k (ns)

7.35

lat_mem_rd-stride128-sz50 (ns)

3.76

lat_mem_rd-stride128-sz500k (ns)

12.52

lat_mem_rd-stride128-sz62k (ns)

9.21

lat_mmap-1m (us)

94.00

lat_ops-double-add (ns)

0.91

lat_ops-double-mul (ns)

5.02

lat_ops-float-add (ns)

0.91

lat_ops-float-mul (ns)

5.02

lat_ops-int-add (ns)

1.26

lat_ops-int-bit (ns)

0.84

lat_ops-int-div (ns)

7.54

lat_ops-int-mod (ns)

7.94

lat_ops-int-mul (ns)

3.82

lat_ops-int64-add (ns)

1.26

lat_ops-int64-bit (ns)

0.84

lat_ops-int64-div (ns)

11.96

lat_ops-int64-mod (ns)

9.21

lat_pagefault (us)

1.97

lat_pipe (us)

33.33

lat_proc-exec (us)

1694.75

lat_proc-fork (us)

1521.50

lat_proc-proccall (us)

0.01

lat_select (us)

52.94

lat_sem (us)

8.03

lat_sig-catch (us)

9.73

lat_sig-install (us)

1.03

lat_sig-prot (us)

0.30

lat_syscall-fstat (us)

2.44

lat_syscall-null (us)

0.51

lat_syscall-open (us)

301.35

lat_syscall-read (us)

0.99

lat_syscall-stat (us)

6.25

lat_syscall-write (us)

0.81

lat_tcp (us)

1.00

lat_unix (us)

60.45

latency_for_0.50_mb_block_size (nanosec)

12.52

latency_for_1.00_mb_block_size (nanosec)

13.75 (min 0.00, max 27.49)

pipe_bandwidth (MBs)

320.24

pipe_latency (microsec)

33.33

procedure_call (microsec)

0.01

select_on_200_tcp_fds (microsec)

52.94

semaphore_latency (microsec)

8.03

signal_handler_latency (microsec)

1.03

signal_handler_overhead (microsec)

9.73

tcp_ip_connection_cost_to_localhost (microsec)

105.29

tcp_latency_using_localhost (microsec)

1.00

Table: LM Bench Metrics

2.2.1.1.2. Dhrystone

Dhrystone is a core only benchmark that runs from warm L1 caches in all modern processors. It scales linearly with clock speed. For standard ARM cores the DMIPS/MHz score will be identical with the same compiler and flags.

Benchmarks

am654x-evm: perf

cpu_clock (MHz)

800.00

dhrystone_per_mhz (DMIPS/MHz)

2.96

dhrystone_per_second (DhrystoneP)

4166666.80

Table: Dhrystone Benchmark

2.2.1.1.3. Whetstone

Benchmarks

am654x-evm: perf

whetstone (MIPS)

3333.30

Table: Whetstone Benchmark

2.2.1.1.4. Linpack

Linpack measures peak double precision (64 bit) floating point performance in solving a dense linear system.

Benchmarks

am654x-evm: perf

linpack (Kflops)

330685.00

Table: Linpack Benchmark

2.2.1.1.5. NBench

NBench which stands for Native Benchmark is used to measure macro benchmarks for commonly used operations such as sorting and analysis algorithms. More information about NBench at https://en.wikipedia.org/wiki/NBench and https://nbench.io/articles/index.html

Benchmarks

am654x-evm: perf

assignment (Iterations)

7.80

fourier (Iterations)

13068.00

fp_emulation (Iterations)

61.25

huffman (Iterations)

670.66

idea (Iterations)

1962.90

lu_decomposition (Iterations)

312.35

neural_net (Iterations)

4.49

numeric_sort (Iterations)

288.74

string_sort (Iterations)

94.75

Table: NBench Benchmarks

2.2.1.1.6. Stream

STREAM is a microbenchmark for measuring data memory system performance without any data reuse. It is designed to miss on caches and exercise data prefetcher and speculative accesses. It uses double precision floating point (64bit) but in most modern processors the memory access will be the bottleneck. The four individual scores are copy, scale as in multiply by constant, add two numbers, and triad for multiply accumulate. For bandwidth, a byte read counts as one and a byte written counts as one, resulting in a score that is double the bandwidth LMBench will show.

Benchmarks

am654x-evm: perf

add (MB/s)

1626.20

copy (MB/s)

1783.50

scale (MB/s)

1807.10

triad (MB/s)

1523.00

Table: Stream

2.2.1.2. Ethernet

Ethernet performance benchmarks were measured using Netperf 2.7.1 https://hewlettpackard.github.io/netperf/doc/netperf.html Test procedures were modeled after those defined in RFC-2544: https://tools.ietf.org/html/rfc2544, where the DUT is the TI device and the “tester” used was a Linux PC. To produce consistent results, it is recommended to carry out performance tests in a private network and to avoid running NFS on the same interface used in the test. In these results, CPU utilization was captured as the total percentage used across all cores on the device, while running the performance test over one external interface.

UDP Throughput (0% loss) was measured by the procedure defined in RFC-2544 section 26.1: Throughput. In this scenario, netperf options burst_size (-b) and wait_time (-w) are used to limit bandwidth during different trials of the test, with the goal of finding the highest rate at which no loss is seen. For example, to limit bandwidth to 500Mbits/sec with 1472B datagram:

burst_size = <bandwidth (bits/sec)> / 8 (bits -> bytes) / <UDP datagram size> / 100 (seconds -> 10 ms)
burst_size = 500000000 / 8 / 1472 / 100 = 425

wait_time = 10 milliseconds (minimum supported by Linux PC used for testing)

UDP Throughput (possible loss) was measured by capturing throughput and packet loss statistics when running the netperf test with no bandwidth limit (remove -b/-w options).

In order to start a netperf client on one device, the other device must have netserver running. To start netserver:

netserver [-p <port_number>] [-4 (IPv4 addressing)] [-6 (IPv6 addressing)]

Running the following shell script from the DUT will trigger netperf clients to measure bidirectional TCP performance for 60 seconds and report CPU utilization. Parameter -k is used in client commands to summarize selected statistics on their own line and -j is used to gain additional timing measurements during the test.

#!/bin/bash
for i in 1
do
   netperf -H <tester ip> -j -c -l 60 -t TCP_STREAM --
      -k DIRECTION,THROUGHPUT,MEAN_LATENCY,LOCAL_CPU_UTIL,REMOTE_CPU_UTIL,LOCAL_BYTES_SENT,REMOTE_BYTES_RECVD,LOCAL_SEND_SIZE &

   netperf -H <tester ip> -j -c -l 60 -t TCP_MAERTS --
      -k DIRECTION,THROUGHPUT,MEAN_LATENCY,LOCAL_CPU_UTIL,REMOTE_CPU_UTIL,LOCAL_BYTES_SENT,REMOTE_BYTES_RECVD,LOCAL_SEND_SIZE &
done

Running the following commands will trigger netperf clients to measure UDP burst performance for 60 seconds at various burst/datagram sizes and report CPU utilization.

  • For UDP egress tests, run netperf client from DUT and start netserver on tester.

netperf -H <tester ip> -j -c -l 60 -t UDP_STREAM -b <burst_size> -w <wait_time> -- -m <UDP datagram size>
   -k DIRECTION,THROUGHPUT,MEAN_LATENCY,LOCAL_CPU_UTIL,REMOTE_CPU_UTIL,LOCAL_BYTES_SENT,REMOTE_BYTES_RECVD,LOCAL_SEND_SIZE
  • For UDP ingress tests, run netperf client from tester and start netserver on DUT.

netperf -H <DUT ip> -j -C -l 60 -t UDP_STREAM -b <burst_size> -w <wait_time> -- -m <UDP datagram size>
   -k DIRECTION,THROUGHPUT,MEAN_LATENCY,LOCAL_CPU_UTIL,REMOTE_CPU_UTIL,LOCAL_BYTES_SENT,REMOTE_BYTES_RECVD,LOCAL_SEND_SIZE

2.2.1.2.1. CPSW/CPSW2g/CPSW3g Ethernet Driver

  • CPSW2g: AM65x, J7200, J721e

  • CPSW3g: AM64x

TCP Bidirectional Throughput

Command Used

am654x-evm: THROUGHPUT (Mbits/sec)

am654x-evm: CPU Load % (LOCAL_CPU_UTIL)

netperf -H 192.168.0.1 -j -c -C -l 60 -t TCP_STREAM; netperf -H 192.168.0.1 -j -c -C -l 60 -t TCP_MAERTS

1663.12

65.01

Table: CPSW TCP Bidirectional Throughput


UDP Throughput

Table: CPSW UDP Egress Throughput


Frame Size(bytes)

am654x-evm: UDP Datagram Size(bytes) (LOCAL_SEND_SIZE)

am654x-evm: THROUGHPUT (Mbits/sec)

am654x-evm: CPU Load % (LOCAL_CPU_UTIL)

64

18.00

1.12

3.35

Table: CPSW UDP Ingress Throughput


Frame Size(bytes)

am654x-evm: UDP Datagram Size(bytes) (LOCAL_SEND_SIZE)

am654x-evm: THROUGHPUT (Mbits/sec)

am654x-evm: CPU Load % (LOCAL_CPU_UTIL)

am654x-evm: Packet Loss %

64

18.00

18.08

40.51

38.43

Table: CPSW UDP Ingress Throughput (possible loss)


2.2.1.3. PCIe Driver

2.2.1.3.1. PCIe-ETH

TCP Window Size(Kbytes)

am654x-evm: Bandwidth (Mbits/sec)

128

0.00

256

0.00

Table: PCI Ethernet

2.2.1.3.2. AM654x-EVM


Buffer size (bytes)

am654x-evm: Write EXT4 Throughput (Mbytes/sec)

am654x-evm: Write EXT4 CPU Load (%)

am654x-evm: Read EXT4 Throughput (Mbytes/sec)

am654x-evm: Read EXT4 CPU Load (%)

1m

23.50

1.01

86.70

1.37

4m

24.40

0.79

85.80

1.26

4k

2.22

2.47

11.90

9.81

256k

20.60

1.00

83.70

2.05


The performance numbers were captured using the following:

  • SanDisk 8GB MicroSDHC Class 10 Memory Card

  • Partition was mounted with async option


2.2.1.4. USB Driver

2.2.1.4.1. USB Host Controller

Warning

IMPORTANT: For Mass-storage applications, the performance numbers can be severely affected if the media is mounted in sync mode. Hot plug scripts in the filesystem mount removable media in sync mode to ensure data integrity. For performance sensitive applications, umount the auto-mounted filesystem and re-mount in async mode.


Setup : SAMSUNG 850 PRO 2.5” 128GB SATA III Internal Solid State Drive (SSD) used with Inateck ASM1153E enclosure is connected to usb port under test. File read/write performance data is captured.


2.2.1.4.2. USB Device Controller

Table: USBDEVICE HIGHSPEED SLAVE READ THROUGHPUT

Number of Blocks

am654x-evm: Throughput (MB/sec)

150

33.40



Table: USBDEVICE HIGHSPEED SLAVE WRITE THROUGHPUT

Number of Blocks

am654x-evm: Throughput (MB/sec)

150

31.60


2.2.1.5. CRYPTO Driver

2.2.1.5.1. IPSec Software Performance

Algorithm

am654x-evm: Throughput (Mbps)

am654x-evm: Packets/Sec

am654x-evm: CPU Load

aes256

2.10

0.00

31.98