nRF5 SDK for Thread and Zigbee v4.1.0
Performance measurement test results (NCP)

Table of Contents

The Spinel protocol has a functionality for transporting logs over SPI, UART, and USB interfaces. This functionality can be used to introduce additional overhead to the communication medium and measure how much the original performance is degradated.

The number of generated logs depends on:

On this page, you can find the results of the performance measurement test that was performed to check the amount of dropped logs for different interfaces when using the Network Co-Processor (NCP) architecture, as well as the description of the test bench and the testing procedure.

The results of this test are at the basis for the following recommendations when working with NCP:


Setup

The measurement test was performed only for the NCP architecture, as it is more complex than the RCP one and generates more logs. To enable the log transport option, the log output option was set to OPENTHREAD_CONFIG_LOG_OUTPUT_NCP_SPINEL.

The following devices were used for the test:

thread_performance_measurement_setup.svg
Figure 1. Border Router performance measurement setup.

Test conditions

Measurement methods
The following measurement methods were adopted because of the amount of logs they generate:
  • Commissioning measurement – The Border Router is commissioning the new joiner CLI device.
  • Ping measurement – The Border Router Host is periodically pinging the CLI device and expects to receive a ping in return.
Measurement
For both measurement methods, the following data was measured:
  • For SPI and UART interfaces: Utilization of communication medium – the bandwidth utilization was calculated using Saleae Logic Analyzer as follows:
    • For SPI, the bandwidth calculation was measuring the time when CS (Chip Select) line was active during measurement.
    • For UART, the bandwidth calculation was measuring the time when RX and TX lines are busy separately.
  • For SPI, UART, and USB interfaces: Rate of dropped logs. Additionally, the bandwidth utilization was calculated for SPI and UART interfaces using Saleae Logic Analyzer:
Additional log counters
To provide more accurate information about the dropped logs, sent logs, and transmitted Spinel frames, additional log counters were added to NCP. These log counters were increased when new data or a log frame was transmitted or rejected. New wpantund command line options were added to read and reset the NCP log counters.
Test log levels
The test was done for all log levels except the NONE one. The DEBG measurements were done for both measurement methods, with packet content dump enabled and disabled.
Interface speeds
The following interface speeds were used for the test:
  • UART: 115200 and 921600 baud rates.
  • SPI: 1 MHz and 8 MHz clock speed.

Test procedure

The measurement procedure comprised of the following steps:

  1. Set up the Thread network (Host/NCP + CLI node).
  2. Reset the NCP log counters from wpantund.
  3. Start Saleae Logic Analyzer measurement.
  4. Start the testing procedure for commissioning and ping measurement methods.
  5. Stop the testing procedure.
  6. Stop Saleae Logic Analyzer measurement.
  7. Read the NCP log counters.

The procedure was identical for the different interfaces, interface speeds, and logging levels. The ping was sent for a total of 1 minute, with 100-ms and 250-ms intervals and with a payload of 64 bytes.


Test results

The tables in this section show the results for the utilization of communication medium for SPI and UART, and the dropped log rates for SPI, UART and USB, with various speeds and for different log levels.

The most significant takeaways are the following:

Results for utilization of communication medium

Commissioning
SPI/UART settings Log level
CRIT
Log level
WARN
Log level
NOTE
Log level
INFO
Log level
DEBG
Log level
DEBG (no packet dump)
SPI default (1 MHz) 0.06% 0.06% 0.06% 1.93% 8.87% 4.02%
SPI max (8 MHz) 0.02% 0.03% 0.03% 0.46% 2.47% 0.97%
UART default (115200 bps) RX 0.05%
TX 0.25%
RX 0.05%
TX 0.25%
RX 0.05%
TX 0.25%
RX 0.04%
TX 8.40%
RX 0.04%
TX 40.26%
RX 0.04%
TX 19.21%
UART max (1 Mbps) RX 0.01%
TX 0.03%
RX 0.01%
TX 0.04%
RX 0.01%
TX 0.04%
RX 0.01%
TX 1.24%
RX 0.01%
TX 6.50%
RX 0.01%
TX 2.68%
Ping - 250 ms
In this measurement, the ping was executed every 250 ms with 64 B of payload.
SPI/UART settings Log level
CRIT
Log level
WARN
Log level
NOTE
Log level
INFO
Log level
DEBG
Log level
DEBG (no packet dump)
SPI default (1 MHz) 1.01% 1.05% 1.06% 4.21% 18.13% 7.89%
SPI max (8 MHz) 0.23% 0.23% 0.23% 0.99% 4.40% 2.09%
UART default (115200 bps) RX 4.61%
TX 4.19%
RX 4.65%
TX 4.21%
RX 4.51%
TX 4.15%
RX 4.72%
TX 19.52%
RX 4.69%
TX 92.25%
RX 4.65%
TX 36.24%
UART max (1 Mbps) RX 0.64%
TX 0.58%
RX 0.64%
TX 0.58%
RX 0.63%
TX 0.58%
RX 0.62%
TX 2.79%
RX 0.65%
TX 13.03%
RX 0.65%
TX 5.20%
Ping - 100 ms
In this measurement, the ping was executed every 100 ms with 64 B of payload.
SPI/UART settings Log level
CRIT
Log level
WARN
Log level
NOTE
Log level
INFO
Log level
DEBG
Log level
DEBG (no packet dump)
SPI default (1 MHz) 2.63% 2.64% 2.65% 9.88% 42.95% 19.48%
SPI max (8 MHz) 0.57% 0.55% 0.56% 2.51% 10.69% 5.20%
UART default (115200 bps) RX 11.13%
TX 10.1%
RX 11.62%
TX 10.52%
RX 11.43%
TX 10.37%
RX 11.63%
TX 47.76%
RX 10.93%
TX 92.64%
RX 11.61%
TX 90.54%
UART max (1 Mbps) RX 1.60%
TX 1.42%
RX 1.63%
TX 1.48%
RX 1.58%
TX 1.44%
RX 1.59%
TX 6.96%
RX 1.62%
TX 32.46%
RX 1.62%
TX 12.87%

Results for dropped log rate

The SPI/UART settings and the log levels tested were identical to the communication medium result tables.

Commissioning
In this measurement, all log levels for both SPI and UART returned values equal to 0%.
Ping - 250 ms
In this measurement, the ping was executed every 250 ms with 64 B of payload.
  • The buffer was increased to 32 kB.
  • All log levels for SPI, UART, and USB returned values equal to 0%.
Ping - 100 ms
In this measurement, the ping was executed every 100 ms with 64 B of payload.
  • All log levels for SPI, UART, and USB returned values equal to 0%, except for one: the DEBG log level with the packet dump measurement for UART (115200 baud rate) shows that 55.54% logs were rejected.

Documentation feedback | Developer Zone | Subscribe | Updated