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

Bernd Walter enut at cicely.de
Tue Jun 9 11:36:09 CEST 2009


I'd build a 3-axis CNC controller with AT91SAM7X256 and Ethernut-4.6.3.
The GCode data is transmitted via TCP.
Some commands, e.g. long lines,  take a long time to process, so the
incoming data is often used slowly.

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 started with 15k free memory.
My routines are using static allocated memmory, so 15k free should be
enough under normal conditions.
Reducing SO_RCVBUF to 256 made the problem appear later.
Then I freed up more memory and started with about 25k and the system
was staying alive, but now I have the problem that the machine stops
in between - maybe because the incoming data is spread over so many
packets?

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list