How to improve the data transfer rate? #2378
Replies: 3 comments 1 reply
-
I'm suspecting the cause is the frequent call of calloc. Is there a way to use statically allocated memory to store the packet? |
Beta Was this translation helpful? Give feedback.
-
If after reading the guidelines in the documentation, including the best practices section, and our examples and tutorials, like https://mongoose.ws/documentation/tutorials/file-uploads/ in particular, you still can't solve your issue: |
Beta Was this translation helpful? Give feedback.
-
@f-zl You can also increase |
Beta Was this translation helpful? Give feedback.
-
I'm developing an http server on an embedded system running FreeRTOS and lwip. The server waits for a single POST request that uploads a boot image file. The file size is about 4.8MB.
The problem is the low data transfer rate, about 1KB/s. Wireshark shows that it takes more than 100 ms for the server to respond to (ACK) a TCP packet. And the time gets longer and longer as the data transfers.
If I replace the mongoose server with a custom TCP server using lwip, the transfer rate is about 800KB/s, so the problem is not in hardware or lwip. Please give me some advices about how to improve the data transfer rate, thanks.
My config:
My code:
Beta Was this translation helpful? Give feedback.
All reactions