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 09:56:48 +0200
User-agent: Roundcube Webmail/1.3.16

Hello Jochem,

On 2022-10-19 18:51, Jochen Strohbeck wrote:
from time to time I experience a significant network performance drop.

Is this during normal use or during load testing/benchmarking?

I'm running an lwip http 1.0 server on SAME70/FreeRTOS and do http
requests on Windows or Linux.

In the wireshark trace I see ACK+RST after a client SYN in case a port
number is used in the request which has been already used a few
milliseconds before.

lwIp does the right thing here, and one extra RST to force Windows to
use another port number should not cause a huge performance drop.

I wonder why http clients running on Windows or Linux are re-using port
numbers that fast. Shouldn't the OS wait for at least MSL before
re-using ports?

Yes, but it's a lot easier to let the remote check for port-reuse than
to check all sockets in TIME_WAIT. What happens is that the port is
chosen randomly.

I guess this can be omitted using persistent connections. Is this the
only remedy to that problem?

I think the main issue is that Windows propagates the RST as an error
to the program doing a connect, instead of silently retrying with a
different port number. So the huge performance drop may be caused by
the program waiting before reconnecting.

You can reduce this problem by increasing the ephemeral port range on
the client PC.

Greetings,

Indan



reply via email to

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