lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] What are LwIP TCP max transfer rates and how can I opti


From: Blue
Subject: Re: [lwip-users] What are LwIP TCP max transfer rates and how can I optimize them?
Date: Wed, 30 Apr 2008 08:48:12 +0200
User-agent: Thunderbird 1.5 (Windows/20051107)

Jonathan Larmour schrieb:
Blue wrote:
Hello to everybody,

For my final exam I have to realise a connection between a PC and a
camera via TCP/IP. On the camera the LwIP Stack (Version 1.1.1) is
embedded. It is the first time, that I work with LwIP.

At the moment I have realized the connection with the low-level “callback”
API, the higher-level “sequential” API can not be used on the camera.
I’m able to transmit pictures from the camera to the PC, but it is not
fast enough. I can transmit four frames in a second (compiles about 53
MBit/s). The camera and the PC have a 1000 Mbit/s Ethernet Port, so that
this is fast enough. When I send only text data as fast as possible the
maximal transfer rate is 86 Mbit/s and I need around 160 Mbit/s to get a
usable result.
Has anybody experiences with transfer rates and knows which transfer rates
are possible with the LwIP TCP Stack and which parameter is relevant to
get the transmission faster?

Assuming you've got enough memory, optimise your TCP MSS to what will fit
in the MTU. Increase the window size as large as you can. Enable lwIP's
statistics and see if it's running out of any resources. Do packet sniffing
to see if you can find any abnormal delays.

Does your ethernet driver copy packets? Maybe for your application you may
wish to try doing zero-copy packets (assuming your ethernet MAC can DMA).

Ultimately, some hardware (CPU, memory bus, ethernet MAC) simply isn't fast
enough to drive things over the wire fast enough. You may have already hit
the limit with your hardware.

Jifl

Thank you for your answer. The problem is, that I can not change the TCP MSS because LwIP is implemented on the camera by the manufacturer. That is why I can not change all parameters on my own. I only have the chance to ask the manufacturer to change things when I know, that this would be optimize the performance.

I made a test with the UDP protocol. I have change continuously the pbuf size in the moment I’m able to send data. First it stops by a pbuf size of 1460 where I get a transfer rate of 14 frames per second. Than I changed the network card of the PC the Jumbo Frames to 9014 so I get transfer rats of 35 frames per second. So I would say the hardware is not the problem. Or are there differences between the hardware used for UDP and that for TCP?

Here are some parameters where I would think they are important:

MEM_SIZE                     0x8000
TCP_MSS                      1460
TCP_SND_QUEUELEN             (4 * TCP_SND_BUF / TCP_MSS) --> 44
TCP_WND                      4096
TCP_MARTX                    12
TCP_SYNMAXRTX                4
MTU                          1500   (that value I can modify)

What do you think which values are the best to get the maximum data transfer?

Gregor





reply via email to

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