[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] MEMP_NUM_TCP_PCB effect on TLS and HTTPD
From: |
address@hidden |
Subject: |
Re: [lwip-users] MEMP_NUM_TCP_PCB effect on TLS and HTTPD |
Date: |
Tue, 8 Oct 2019 21:15:57 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Am 08.10.2019 um 13:15 schrieb Mário Luzeiro:
Hello all,
I have a HTTPD via mbedTLS all is going OK except I have issues with multiple
connections from browser requests (browsers send multiple connection at same
time to faster load the website). Sometimes it cannot make the connection and
cannot load all external files in the webpage.
I was playing with MEMP_NUM_TCP_PCB and I got some behavior I cannot explain
and looking for your help.
MEMP_NUM_TCP_PCB 5
https://i.imgur.com/6oNwz15.png
File loads in 27s
MEMP_NUM_TCP_PCB 12
https://i.imgur.com/c449wIz.png
note: TTFB means Time To First Byte
File loads in 420ms
So if I set an higher MEMP_NUM_TCP_PCB value it all times will take that slow
400ms
does anyone could explain what could MEMP_NUM_TCP_PCB influence in this case?
You should definitively debug this using wireshark to see what's going
on, but I guess the browser still opens multiple connections to load the
single image (as a result of TLS negotiation). Then you might just hit
the limit of parallel connections and new connections must wait until
old connections are closed.
Httpd via https uses altcp, which needs 2 altcp_pcbs per connection
(plus one tcp_pcb). And MEMP_NUM_ALTCP_PCB is defined to
MEMP_NUM_TCP_PCB unless explicitly set. Thus you can only have 2
parallel TLS connections, which migh explain what you see.
Regards,
Simon