lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Performance drop due port numbers reused too fast


From: Indan Zupancic
Subject: Re: [lwip-users] Performance drop due port numbers reused too fast
Date: Thu, 20 Oct 2022 17:39:50 +0200
User-agent: Roundcube Webmail/1.3.16

Hello Jochem,

On 2022-10-20 14:44, Jochen Strohbeck wrote:
The server will sent ACK instead SYN+ACK for 50118 and 50130 because
these port numbers have been previously used less than a second before.

Was the connection closed properly by both sides when this happens?

If the sequence number is totally wrong it should send a RST I think,
but if it seems from the future it should send an ACK for the last
received packet (not ACKing the SYN itself!). TCP originally allowed
connection re-use, so continuing after FIN. You could argue that lwIP
should always send a RST after closing a connection and getting new data.

It depends. First I used a single timeout parameter e.g. 10s for the
http request. This results in multiple retransmit (using backoff) until
10s are over. Because the retransmit is using the same port number, each
retry fails.

The retransmits should be solved if lwIP sends a RST instead of an ACK.
Personally I've only seen lwIP sending RST, never an ACK for re-used ports.
What lwIP version are you using and is the ACK problem gone with master?

Yes, but I guess there is something else I can do to make the
performance drop less painful. Maybe some other windows parameter?

Try newest lwIP version and see if the problem persists: If RST is sent
on port re-use the problem should be much severe, assuming the application
reconnects immediately.

Greetings,

Indan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]