nRF7002 data throughput and performance

Hi,

We are evaluating the nRF7002 Wi-Fi Companion device. We are not able to achieve the data throughput performance that we would need for our application, and we would like to understand why and if anything can be done.

Test Setup:

We use the nRF7002-DK evaluation kit for our tests.

Visual Studio Code 1.83.1

nRF Connect for Desktop v4.1.2

nRF Connect SDK 2.4.1

We use the Wi-Fi BLE Coexistence example to measure data throughput.

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/wifi/sr_coex/README.html

 

 Test: Out-of-the-box Performance with Wi-Fi/BLE Coexistence example:

Using iperf 2.0.9. Command line : iperf -s -i 1 -e -f M

 BLE test is disabled

 Several of the configuration variables were adjusted to match the recommended values for the High performance STA mode Usage Profile, as per “Operating with a resource constrained host” page (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf70/developing/constrained.html#usage-profiles )

 

In order to compile a binary that actually connects to the TCP server, it was  necessary to change CONFIG_HEAP_MEM_POOL_SIZE=200000, instead of 230000.

The test also changed the call from zperf_udp_upload_async to zperf_tcp_upload_async to run a TCP test instead.

 

The firmware runs, connects to the iperf server and transfer data. However, the data throughput is not near the expected throughput of 14.2Mbps, and there are some errors shown during the test:

 

[00:00:32.127,777] <inf> coex: New UDP session started

[00:00:41.683,227] <err> net_pkt: Data buffer (68) allocation failed.

[00:00:51.101,531] <err> net_pkt: Data buffer (1500) allocation failed.

[00:00:51.101,531] <err> net_tcp: conn: 0x20067288 packet allocation failed, len=1460

[00:01:00.318,786] <inf> coex: Wi-Fi benchmark: Upload completed!

[00:01:00.318,786] <inf> coex: Upload results:

[00:01:00.318,786] <inf> coex: 2298880 bytes in 27971 ms

[00:01:00.318,786] <inf> coex: 2245 packets sent

[00:01:00.318,786] <inf> coex: 0 packets lost

[00:01:00.318,786] <inf> coex: 272629760 packets received

[00:01:00.318,817] <inf> coex: UDP SESSION FINISHED

[00:01:00.318,817] <inf> coex: Disconnecting Wi-Fi

 

[00:01:00.322,753] <inf> coex: Disconnection request done (0)

[00:01:00.347,137] <inf> coex: Status: successful

 

The nRF7002-DK is located next to the Wi-Fi 6 Access Point, and there are only a couple of other devices connected to the AP with low data usage.

 

Iperf reports:

 

[  4] local 10.0.0.31 port 5001 connected with 10.0.0.210 port 35769

[  4] 0.00-1.00 sec  0.91 MBytes  0.91 MBytes/sec  620    620:0:0:0:0:0:0:0

[  4] 1.00-2.00 sec  0.18 MBytes  0.18 MBytes/sec  122    122:0:0:0:0:0:0:0

[  4] 2.00-3.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 3.00-4.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 4.00-5.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 5.00-6.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 6.00-7.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 7.00-8.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 8.00-9.00 sec  0.00 MBytes  0.00 MBytes/sec  0    0:0:0:0:0:0:0:0

[  4] 9.00-10.00 sec  0.59 MBytes  0.59 MBytes/sec  418    418:0:0:0:0:0:0:0

[  4] 10.00-11.00 sec  0.49 MBytes  0.49 MBytes/sec  314    314:0:0:0:0:0:0:0

 

 

Questions:

  1. nRF7002 Product Specification states that the device can deliver a PHY data rate of 86 Mbps (MCS7). Is there a way to really achieve this data rate?

 

  1. Section 7.3 QSPI throughput, show an expected peak achievable throughput of ~40 Mbps for TCP TX mode. Can you provide a working example that can achieve this?

 

  1. Even though nrf7002 PS, Section 7.3 QSPI throughput shows higher data throughput values, the effective data throughput presented in the “Operating with a resource constrained host” page (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/device_guides/working_with_nrf/nrf70/developing/constrained.html#usage-profiles ) shows much less performance. The High performance STA mode Usage Profile gives a 14.2 Mbps measurement under ideal RF conditions. Why is there such difference between the Product Specification and the effective measurements?

 

  1. Is it possible to determine what kind of data rate is being used during these tests? Does the nRF7002 drivers select the best (highest) data rate possible or is there a way to setup the driver to select the highest data rate?

 

  1. The compiled binaries appear to use most of the Flash and RAM memory of the host processor (nRF5340), despite the application being very simple (the iperf test).

 

[12/14] Linking C executable zephyr\zephyr.elf

Memory region         Used Size  Region Size  %age Used

           FLASH:      752564 B         1 MB     71.77%

             RAM:      423928 B       448 KB     92.41%

        IDT_LIST:          0 GB         2 KB      0.00%

[13/14] Generating zephyr/merged.hex

[14/14] Generating zephyr/merged_domains.hex

 

I imagine there are several optimizations and configuration to do, but it seems that the Zephyr OS is very bloated and takes too much of the Flash. Is that the case? Is it possible to get real examples of applications that use reasonable levels of Flash.

Thanks!

Alex.

Parents
  • Hi

    Sorry, it took a while to get into this ticket. 

    First off, it seems like you're mixing up Bytes and bits (there are 8 bits in 1 byte). Note that I.E. Mbps like what's stated in the usage profiles and the nRF7002 product specification refers to Megabits per second, and not MBytes/second like what the sample project reports.

    Your test results seem a bit low, but not very much off from what we see in the sample test results, but it seems to drop entirely mid-testing for some reason. Torbjørn is currently in discussions with the devs on this, and will get back to the case you linked to when he hears from them. 

    As for your questions:

    1. This is the theoretical maximum throughput that the radio can achieve, and this sample isn't really created for throughput specifically, so in a real world use case I don't think this maximum throughput would be totally feasible.

    2. Unfortunately we do not have a sample showcasing 40Mbps throughput in TCP TX mode over QSPI. That table details the expected peak achievable UDP/TCP throughput numbers for a QSPI/SPI master clock rate of 24 MHz, and where the networking stack executing on the host is not a limiting factor. These numbers are projected using measured raw QSPI/SPI master packet transmission.

    3. This is mostly due to the coexistence sample not being mainly created for throughput purposes, but rather to show how you can use both BLE and Wi-Fi coexisting together, and the Wi-Fi shell sample and zperf might be better suited to showcase the throughput you can expect from the nRF7002.

    4. There are a lot of factors going into what throughput you're seeing, in addition to what you mention (range from access point, other devices connected to the network, etc.) the access point (network router) used, the antenna on the nRF7002 device used, and what the host device is flashed with all play a role in what the throughput you will be able to see. I wouldn't expect more than what tests our samples refer to from a specific sample, but you're free to tweak with settings like buffers, packet size, data rate, and so on to try to maximize it. Specifically these ones in the sr_coex sample:

    # DUT zperf configuration
    CONFIG_WIFI_ZPERF_PROT_UDP=y
    CONFIG_WIFI_ZPERF_PKT_SIZE=1024
    CONFIG_WIFI_ZPERF_RATE=10000
    CONFIG_WIFI_ZPERF_SERVER=n
    
    CONFIG_NRF700X_MAX_TX_PENDING_QLEN=12
    CONFIG_NRF700X_QSPI_LOW_POWER=n

    5. The Bluetooth stack + the Wi-Fi stack will take up quite a bit of Flash space on the nRF5340 indeed. But please note that the sample isn't optimized for size specifically, so you should be able to lower the Flash size taken somewhat at least.

    Best regards,

    Simon

Reply
  • Hi

    Sorry, it took a while to get into this ticket. 

    First off, it seems like you're mixing up Bytes and bits (there are 8 bits in 1 byte). Note that I.E. Mbps like what's stated in the usage profiles and the nRF7002 product specification refers to Megabits per second, and not MBytes/second like what the sample project reports.

    Your test results seem a bit low, but not very much off from what we see in the sample test results, but it seems to drop entirely mid-testing for some reason. Torbjørn is currently in discussions with the devs on this, and will get back to the case you linked to when he hears from them. 

    As for your questions:

    1. This is the theoretical maximum throughput that the radio can achieve, and this sample isn't really created for throughput specifically, so in a real world use case I don't think this maximum throughput would be totally feasible.

    2. Unfortunately we do not have a sample showcasing 40Mbps throughput in TCP TX mode over QSPI. That table details the expected peak achievable UDP/TCP throughput numbers for a QSPI/SPI master clock rate of 24 MHz, and where the networking stack executing on the host is not a limiting factor. These numbers are projected using measured raw QSPI/SPI master packet transmission.

    3. This is mostly due to the coexistence sample not being mainly created for throughput purposes, but rather to show how you can use both BLE and Wi-Fi coexisting together, and the Wi-Fi shell sample and zperf might be better suited to showcase the throughput you can expect from the nRF7002.

    4. There are a lot of factors going into what throughput you're seeing, in addition to what you mention (range from access point, other devices connected to the network, etc.) the access point (network router) used, the antenna on the nRF7002 device used, and what the host device is flashed with all play a role in what the throughput you will be able to see. I wouldn't expect more than what tests our samples refer to from a specific sample, but you're free to tweak with settings like buffers, packet size, data rate, and so on to try to maximize it. Specifically these ones in the sr_coex sample:

    # DUT zperf configuration
    CONFIG_WIFI_ZPERF_PROT_UDP=y
    CONFIG_WIFI_ZPERF_PKT_SIZE=1024
    CONFIG_WIFI_ZPERF_RATE=10000
    CONFIG_WIFI_ZPERF_SERVER=n
    
    CONFIG_NRF700X_MAX_TX_PENDING_QLEN=12
    CONFIG_NRF700X_QSPI_LOW_POWER=n

    5. The Bluetooth stack + the Wi-Fi stack will take up quite a bit of Flash space on the nRF5340 indeed. But please note that the sample isn't optimized for size specifically, so you should be able to lower the Flash size taken somewhat at least.

    Best regards,

    Simon

Children
No Data
Related