Dear Simon, Thanks for your reply. I have set 40kB of heap, and every time I stop the microcontroller in debug mode during web site request, the free memory is over 70%. This is my configuration:
#define MEM_SIZE (40*1024) #define MEMP_NUM_PBUF 28 #define MEMP_NUM_TCP_PCB 10 #define MEMP_NUM_TCP_PCB_LISTEN 3 #define MEMP_NUM_TCP_SEG 40 #define PBUF_POOL_SIZE 15 #define TCP_MSS (1500 - 40) #define TCP_SND_BUF (3*TCP_MSS) #define TCP_SND_QUEUELEN (6 * TCP_SND_BUF)/TCP_MSS #define TCP_WND (3*TCP_MSS) Is there anything I can change? Regards, Marco > Il giorno 15 set 2021, alle ore 09:55, goldsi...@gmx.de ha scritto: > > Am 15.09.2021 um 08:55 schrieb Marco Giammarini: >> Dear All, >> I’m studying this problem more in-depth (with Wireshark), and I found >> that sometimes Windows reply with ACK after 40ms at every packet. In >> this case, with a file of 800kB, a packet of 1460B, we have more or less >> 500 packets, that multiplied for 40ms reach 20 seconds each file. >> I found that this problem is very common for Windows PC: >> * https://developpaper.com/lets-talk-about-the-magical-40-ms-of-tcp/ >> <https://developpaper.com/lets-talk-about-the-magical-40-ms-of-tcp/> >> * >> https://docs.microsoft.com/it-it/troubleshoot/windows-server/networking/registry-entry-control-tcp-acknowledgment-behavior >> <https://docs.microsoft.com/it-it/troubleshoot/windows-server/networking/registry-entry-control-tcp-acknowledgment-behavior> >> >> Is there any way to solve the problem (or a workaround) by modify some >> parameters of lwIP? > > You should not have a speed problem even if the ACKs get delayed > further. Having a problem here suggests that your lwIP (memory) options > limit the send window in such amount that transmission stalls until the > next ACK is received. > > Unless you're really short on memory, you should probably review your > TCP and memory related options in lwipopts.h > > Regards, > Simon > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users