lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Performance issues with large packages.


From: ThomasJ
Subject: [lwip-users] Performance issues with large packages.
Date: Tue, 9 Sep 2014 06:26:12 -0700 (MST)

Hi, 

I have some issues with lwIP 1.4.1

My lwip target connect to a PC application over TCP/IP.
I'm using netconn API.

When I send small packages between the server and client I have no problems.
But if I increase the package size (+512 bytes), I do have problems both
way.

Here is a capture from wireshark, where the server sends 14 bytes to the
target. When the 14 bytes is received it returns 1024 bytes to the server.
When the server receive the 1024 bytes, it sends the 14 bytes again, etc

*14 byte from server:*

1625    26.718286000    10.35.16.169    10.35.18.178    TCP     68      [TCP 
Retransmission]
rtsserv > 49153 [PSH, ACK] Seq=729 Ack=53249 Win=64240 Len=14

*1024 bytes from lwip*
1613    26.426535000    10.35.18.178    10.35.16.169    TCP     1078    49153 > 
rtsserv [PSH,
ACK] Seq=53249 Ack=743 Win=10938 Len=1024

*Then 14 bytes retrans from server again - the previus package?*

1625    26.718286000    10.35.16.169    10.35.18.178    TCP     68      [TCP 
Retransmission]
rtsserv > 49153 [PSH, ACK] Seq=729 Ack=53249 Win=64240 Len=14

*Then the data from client'*

1662    27.624312000    10.35.18.178    10.35.16.169    TCP     1078    [TCP 
Retransmission]
49153 > rtsserv [PSH, ACK] Seq=53249 Ack=743 Win=10938 Len=1024

So it seems that the lwip did miss the first tcp packet.? Or did miss some
TCP handshake packages?
It comes in bursts. Runs very fast for seconds, then the re-transmission and
then it runs fast again.

I have tried many defines for TCP_MSS. The above happens with  TCP_MSS 1460

If TCP_MSS is 436 i see this in wire shark.

*14 bytes from server:*
78      2.047602000     10.35.16.169    10.35.18.178    TCP     68      rtsserv 
> 49153 [PSH, ACK]
Seq=57 Ack=4097 Win=65392 Len=14

*First 436 bytes from lwip:*
79      2.048397000     10.35.18.178    10.35.16.169    TCP     490     49153 > 
rtsserv [ACK]
Seq=4097 Ack=71 Win=3390 Len=436

*Then a smaller packet 206 bytes? - The last one (2x436 + 206 = 10524 bytes) 
Expert Info (Warn/Sequence): Previous segment not captured (common at
capture start)*
80      2.048398000     10.35.18.178    10.35.16.169    TCP     206     [TCP 
Previous segment not
captured] 49153 > rtsserv [PSH, ACK] Seq=4969 Ack=71 Win=3390 Len=152

*Then 436 bytes - schould has been the second package*
128     3.214474000     10.35.18.178    10.35.16.169    TCP     490     [TCP 
Retransmission] 49153
> rtsserv [ACK] Seq=4533 Ack=71 Win=3390 Len=436

Also here it comes in bursts. It should be 3 package from lwip. the first 2
of 436 bytes and then one 206
So it seems that the second 436 bytes package was not send from lwip, but
retransmitted as the last one?

I'm using a lpc1788 and lpcopen/EA1788 code share.

Any suggestions?

Thomas



--
View this message in context: 
http://lwip.100.n7.nabble.com/Performance-issues-with-large-packages-tp23227.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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