[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] very poor performance of httpd
From: |
Felix Frey |
Subject: |
Re: [lwip-users] very poor performance of httpd |
Date: |
Tue, 18 Aug 2020 16:17:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On further investigation on this, I've found an interesting fact.
Any changes in the lwip's configuration didn't cause a change, however,
when I enabled MEMP_DEBUG the problem was gone, no more of this strange
"Trying to send 0 bytes" occurencies and the httpd responded fast and as
expected.
Of course this isn't a real solution because lwip generates lots of messages
when memp_debug is enabled. Anyway, it seems the problem is not inside the
httpd but maybe deeper.
I really appreciate if anybody has an idea what could be the relation.
Felix
Am 17.08.20 um 16:28 schrieb Mário Luzeiro:
> Hi Felix,
>
> I had similar issues but using TLS
> https://lists.nongnu.org/archive/html/lwip-users/2020-05/msg00006.html
>
> I experience the same: some requests are very quick and others take seconds.
> ..but didn't found a solution yet.
>
> I will follow this thread in case someone comes with more suggestions.
>
> I suggest you can start trying to increase MEMP_NUM_TCP_PCB to the double
> I think play with smaller values in TCP_MSS and/or TCP_WND could help.. but
> not sure...
>
> Mario
>
> ________________________________________
> From: lwip-users <lwip-users-bounces+mrluzeiro=ua.pt@nongnu.org> on behalf of
> Felix Frey <frey@stettbacher.ch>
> Sent: 17 August 2020 14:40
> To: lwip-users@nongnu.org
> Subject: [lwip-users] very poor performance of httpd
>
> Hi,
>
> I've running an application on a STM32F429 using LwIP 2.0.3 and it's httpd.
> Basically it works fine, however the performance of the httpd is very poor.
>
> When the browser does a http request for a total of five files (statically
> linked)
> with a total amount of 40kB, it takes about 5sec to complete the request.
> It seems like the httpd gets stalled.
> In the log I can see several of the entrys below:
> -----
> 00006.560: http_poll: pcb=0x2000d7b8 hs=0x2000db08 pcb_state=ESTABLISHED
> 00006.560: http_poll: try to send more data
> 00006.560: http_send: hs=0x2000db08 pcb=0x2000d7b8 left=22030
> 00006.560: Trying to send 0 bytes
> 00006.560: Sent 0 bytes
> 00006.560: send_data end.
> 00006.560: tcp_output
> -----
> This is repeated every 500ms for about 2sec until sending moves on.
> It looks like it simply doesn't anything during this time. Why??
>
> My memory settings are:
> #define MEM_LIBC_MALLOC 1
> #define MEMP_NUM_TCP_PCB 8
> #define MEMP_NUM_PBUF 32
> #define TCP_MSS 1460
> #define TCP_WND 2920
>
> I've already played with configuration settings, however, it didn't change a
> lot.
> Can anybody explain this behaviour or even help to improve it?
>
> Thanks in advance.
> Felix
>
> _______________________________________________
> 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
>
--
Felix Frey
Stettbacher Signal Processing
Neugutstrasse 54
CH-8600 Dübendorf, Switzerland
Fon +41 43 299 57 23
frey@stettbacher.ch
http://www.stettbacher.ch