Replies: 5 comments 14 replies
-
|
Hi! I'm not an expert with TCP tuning, but I did do some testing. Regarding the MSS, you might get better performance increasing it to around 1400, but I wouldn't recommend increasing it past there, as then you will run into the maximum size of an IP packet and the IP stack will start having to fragment your TCP packets. In my experience, the single most important variable is the TCP window size, Anyway, yeah I would expect network operations to be faster with the new driver, but it does depend a bit on your application. I'd love if you could give it a try, both with the default settings and with |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your response, Jamie! I decided to measure transfer time. I trigger the function rx_t.reset(); client_sock[clnt]->set_blocking(true); rx_t.stop();
Data arrives PC correctly, but as you can see the transfer time is varying a lot! From 5-6 ms to few seconds! |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately disabling DCache doesn't help.
As you can see, sometimes both buffers are transmitted normally within 4.5 ms (very quickly!), but very often the first buffer now takes 50–100 ms to send. But transfers lasting 1 second or longer are now very rare. |
Beta Was this translation helpful? Give feedback.
-
|
Hello Jamie, |
Beta Was this translation helpful? Give feedback.
-
|
@IrekRM could you put in a PR to add some more optimized lwIP settings for STM targets? I ran into some issues that my STM32F767 devices would occasionally hang when making network requests. While troubleshooting, I noticed there was basically no tuning at all for STM targets. In v6.x the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I need to send 32 KB from the NUCLEO-H743ZI2 board to a computer as quickly as possible. The Nucleo board is connected to a dedicated Ethernet adapter on the computer, so there’s no interference from the global Internet, and in theory I can use the full 100 Mbps speed. On the board the TCP server is running based on the MBed OS. The computer connects to it as a client, and when the data on the NUCLEO board is ready, it is sent from the server to the client. I send data buffer in a next manner:
With MBed 6.xx to speed up transmissions I used some increase of LWIP parameters
"lwip.tcp-mss": 2144, "lwip.tcpip-thread-stacksize": 9600, "lwip.mem-size": 10624This sped up the transfer, but the connection was still unstable and the server would freeze frequently.
In the release notes of MBed CE 7.0 there is very attractive sentence: "Ethernet drivers for all STM32 devices completely rewritten from scratch to avoid the troubled HAL drivers, perform better, properly support multicast, and be compatible with the CPU cache."
So I’d like to know how the MBed CE experts would recommend handling this kind of relatively large and fast data transfer over TCP?
Currently, the default value of MSS is 536 bytes. Do I need to split my data into smaller packets and send them one by one?
Does my data buffer need to be aligned to any specific addresses?
Thank you in advance for your advice!
Beta Was this translation helpful? Give feedback.
All reactions