Column: Embedded design
Figure 2: iperf that corresponds to the PID reported by Linux is executing twice
with the flag–cpu-list, to determine which processor cores are allowed to run iperf. We see that any processor core can run iperf. Then I run iperf in client mode from the
host machine, by executing the following command, where I am attempting to push through 1Gbps of data to the server (and that’s getting pretty close to the limit):
$> iperf -b1G -c 192.168.2.247 -p5001 [ 3] 0.0-10.0 sec 1.10 GBytes 851 Mbits/sec
Consider what would happen if I didn’t allow Linux to choose the optimal processor core and instead pinned the iperf server execution to a specific core. I’ll artificially handicap the setup to evaluate the impact on throughput, by pinning the iperf server to CPU3 (recall that CPU0 is responsible for handling interrupts from the eth0 interface) with the following command on the Jetson Nano:
$> taskset -p --cpu-list 3 12910 pid 20977’s current affinity list: 0-3 pid 20977’s new affinity list: 3
Running iperf again, I get the same average throughput of 851Mbps. Since I hypothesised that it would take more time to send data from CPU0 to CPU3,
Figure 4: Correlation between when the eth0 interrupt handler and the iperf instance are executing
Figure 5: Throughput measurement pattern
Figure 3: iperf executing on different CPU cores
throughput will have dropped – but it didn’t. Tracealyzer should help find out why. First, I start a lttng capture on the
Jetson Nano:
$> lttng create $> lttng enable-event -k -a $> lttng enable-event -u --all $> lttng add-context -k -t pid $> lttng add-context -k -t ppid $> lttng start
www.electronicsworld.co.uk April 2021 09
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44