This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Bandwidth drop with more than 1024 bytes with TCP or UDP sockets (nRF9160 DK)

Hello,

I am doing tests on nRF9160 DK and I observe that if I send more than 1024 bytes on a TCP or UDP socket, the bandwidth drops.

Here are some numbers :

for TCP : 

Payload size [B] Throughput [KB/s]
1000 15.32
1023 15.61
1024 15.57
1025 3.17
1050 3.18

for UDP : 

Payload size [B] Throughput [KB/s]
1000 24.19
1023 25.44
1024 25.01
1025 12.37
1050 12.58

We can see that the bitrate drops after 1024 bytes. Do you have any idea why ? and if it is possible to avoid that ?

I am using :

- nRF COnnect SDK v1.4.99-dev1

- nRF9160 DK

- BSD library (CONFIG_BSD_LIBRARY=y) & standard POSIX 

Here is the loop I'm using to send the payload 

The parameter SIZE_BUFFER represents the size of payload.

Thanks 

Parents
  • Hello,

    can you explain how you are measuring the throughput? The bandwidth drop could be related to the MTU and scheduling of UDP packets.

  • Hello,

    I am sending in a while loop (for 30 seconds) a buffer of SIZE BUFFER bytes with a socket TCP or UDP, like picture in my first post. I am sending to a personal server in C++. the server listens constantly and count sum of bytes received. After 30 seconds, I calculate a throughput in dividing the sum of bytes received by 30 seconds.

    Let me know if you need more information and which information.

    The limit of 1024 to 1025 is strange. And there is a similarity with TCP and UDP.  Is it possible that there is a link with the internal management of buffers and / or internal communication of the nRF?

    Thanks

Reply
  • Hello,

    I am sending in a while loop (for 30 seconds) a buffer of SIZE BUFFER bytes with a socket TCP or UDP, like picture in my first post. I am sending to a personal server in C++. the server listens constantly and count sum of bytes received. After 30 seconds, I calculate a throughput in dividing the sum of bytes received by 30 seconds.

    Let me know if you need more information and which information.

    The limit of 1024 to 1025 is strange. And there is a similarity with TCP and UDP.  Is it possible that there is a link with the internal management of buffers and / or internal communication of the nRF?

    Thanks

Children
Related