Skip to content

Commit c81a275

Browse files
D-Trivenirlubos
authored andcommitted
samples: wifi: Optimize network buffer settings for improved throughput
Override default 4KB sizes of Tx and Rx data pools to achieve better throughput. Signed-off-by: Triveni Danda <[email protected]>
1 parent 3bcaa15 commit c81a275

File tree

7 files changed

+51
-5
lines changed

7 files changed

+51
-5
lines changed

samples/wifi/shell/Kconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
menu "Nordic Shell sample"
8+
9+
if NET_BUF_FIXED_DATA_SIZE
10+
11+
config NET_BUF_DATA_SIZE
12+
default 1100
13+
14+
endif
15+
16+
# Configure variable network buffer pool sizes for TX and RX
17+
if NET_BUF_VARIABLE_DATA_SIZE
18+
19+
# nRF52 and nRF54 Series targets have less memory
20+
# so smaller pool sizes are recommended for these targets.
21+
config NET_PKT_BUF_TX_DATA_POOL_SIZE
22+
default 50000 if !SOC_SERIES_NRF52X && !SOC_SERIES_NRF54LX && !SOC_SERIES_NRF54HX
23+
24+
config NET_PKT_BUF_RX_DATA_POOL_SIZE
25+
default 20000 if !SOC_SERIES_NRF52X && !SOC_SERIES_NRF54LX && !SOC_SERIES_NRF54HX
26+
27+
endif
28+
29+
source "Kconfig.zephyr"
30+
31+
endmenu

samples/wifi/throughput/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,15 @@ The following table collects a summary of results obtained when throughput tests
297297
| Profile | UDP TX | UDP RX | TCP TX | TCP RX |
298298
| | | | | |
299299
+========================+===========+===========+===========+===========+
300-
| IoT devices | 5.08 Mbps | 5.43 Mbps | 5.25 Mbps | 3.35 Mbps |
300+
| IoT devices | 5.7 Mbps | 6 Mbps | 7 Mbps | 3.2 Mbps |
301301
+------------------------+-----------+-----------+-----------+-----------+
302-
| Memory-optimized | 5.1 Mbps | 113 Kbps | 644 Kbps | 1.86 Mbps |
302+
| Memory-optimized | 5.7 Mbps | 4.2 Mbps | 4.8 Mbps | 6.2 Mbps |
303303
+------------------------+-----------+-----------+-----------+-----------+
304-
| High performance | 26.2 Mbps | 13.08 Mbps| 14.1 Mbps | 7.76 Mbps |
304+
| High performance | 16.5 Mbps | 16.3 Mbps | 9.5 Mbps | 10.6 Mbps |
305305
+------------------------+-----------+-----------+-----------+-----------+
306-
| TX prioritized | 26.3 Mbps | 12.20 Mbps| 10.5 Mbps | 4.5 Mbps |
306+
| TX prioritized | 16.6 Mbps | 13.4 Mbps | 8.5 Mbps | 6.6 Mbps |
307307
+------------------------+-----------+-----------+-----------+-----------+
308-
| RX prioritized | 9.34 Mbps | 13.46 Mbps| 5.48 Mbps | 7.92 Mbps |
308+
| RX prioritized | 8.6 Mbps | 17.9 Mbps | 6.2 Mbps | 7.7 Mbps |
309309
+------------------------+-----------+-----------+-----------+-----------+
310310

311311
.. note::

samples/wifi/throughput/overlay-high-performance.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=20
1616
CONFIG_MAIN_STACK_SIZE=5200
1717
CONFIG_SHELL_STACK_SIZE=5200
1818
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
19+
20+
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=45000
21+
CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=25000

samples/wifi/throughput/overlay-iot-devices.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=20
1717
CONFIG_MAIN_STACK_SIZE=5200
1818
CONFIG_SHELL_STACK_SIZE=5200
1919
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
20+
21+
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=15000
22+
CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=60000

samples/wifi/throughput/overlay-memory-optimized.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=20
1717
CONFIG_MAIN_STACK_SIZE=5200
1818
CONFIG_SHELL_STACK_SIZE=5200
1919
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
20+
21+
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=8192
22+
CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=8192

samples/wifi/throughput/overlay-rx-prio.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=20
1717
CONFIG_MAIN_STACK_SIZE=5200
1818
CONFIG_SHELL_STACK_SIZE=5200
1919
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
20+
21+
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=12000
22+
CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=18000

samples/wifi/throughput/overlay-tx-prio.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ CONFIG_NET_SOCKETS_POLL_MAX=20
1717
CONFIG_MAIN_STACK_SIZE=5200
1818
CONFIG_SHELL_STACK_SIZE=5200
1919
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4600
20+
21+
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE=25000
22+
CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE=15000

0 commit comments

Comments
 (0)