[En-Nut-Discussion] TCP uses to much memory with zero window?

Harald Kipp harald.kipp at egnite.de
Tue Jun 9 13:03:15 CEST 2009


Bernd Walter wrote:
> I'd build a 3-axis CNC controller with AT91SAM7X256 and Ethernut-4.6.3.
> The GCode data is transmitted via TCP.

Most interesting project.


> After many succesfull tests using fast movement I had the problem
> with slow movements that the memory filled up.
> I see that the sending host is transmitting many zero window probe
> frames and ethernut ack's them all.
> Now I asume that ethernut wastes lot of overhead maintaining those
> packets.

I do not believe that the zero window probes consume a lot of RAM, but I
may be wrong. Acknowledging zero window probes shouldn't consume much
RAM or CPU power.


> Reducing SO_RCVBUF to 256 made the problem appear later.

In general it is not a good idea to reduce SO_RCVBUF below MSS. Actually
I'd recommend to set it at least to 3*MSS. Nut/OS set the MSS (max.
segment size) to 536 by default, which is the lowest value for avoiding
fragmentation in todays environments. (Nut/OS cannot handle IP fragments).

Any reason for using this Nut/OS version? At least 4.6.5 should be fully
compatible and fixes several bugs.

http://ethernut.cvs.sourceforge.net/ethernut/nut/ChangeLog?revision=1.463.2.5&pathrev=nut-4_6-branch

Any problems with 4.8? Just asking because I'd like to setup a similar
environment here for testing and would prefer to test the latest stable
version.

Harald





More information about the En-Nut-Discussion mailing list