lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Re: lwip-users Digest, Vol 67, Issue 6


From: Bill Auerbach
Subject: RE: [lwip-users] Re: lwip-users Digest, Vol 67, Issue 6
Date: Tue, 3 Mar 2009 17:22:48 -0500

I’ve spent about a month optimizing TCP bandwidth for transmitting while doing other parts of my application.  All of the following improve bandwidth in approximate order of amount of improvement gained:

 

1.       Optimize your Ethernet driver.

2.       Optimize the speed of inet_chksum. Use assembly language (better) or hardware if possible (best).

3.       Optimize mempcy – use inline code to DMA memory-to-memory if possible.  Inline SMEMCPY to copy words if you don’t have alignment restrictions.

4.       Use a no-copy driver/data interface.  (Easiest with NO_SYS=1)

5.       Disable Nagle.  For NO_SYS=1 do this manually: pcb->flags |= TF_NODELAY

6.       MEMP_NUM_PBUF, MEMP_NUM_TCP_SEG and TCP_WND – make as large as possible.  MEMP_NUM_PBUF and MEMP_NUM_TCP_SEG need to be close to the same number because a no-copy implementation will use one of each for each queued segment.

 

Bill

 

PS: To the OP – it would be much nicer to use a meaningful subject!

 

From: address@hidden [mailto:address@hidden On Behalf Of Chen
Sent: Tuesday, March 03, 2009 2:51 PM
To: address@hidden
Subject: [lwip-users] Re: lwip-users Digest, Vol 67, Issue 6

 

The TCP's tx bandwidth is greatly affected by the size of payload for lwip_send.

My test is to send out 1000000 bytes of data as fast as possible (via TCP connection, such as telnet)

If payload is 100 bytes, it takes only a few seconds to send out all the data. If the payload is 2048, it takes a loooooooooooong time

Any comment?



Subject: Re: [lwip-users] Re: lwip-users Digest, Vol 67, Issue 5
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain

On Tue, 2009-03-03 at 09:05 -0500, Chen wrote:

> 2) When I lwip_send too much data, the program actually crashes --- I
> will investigate   more on the cause

Thanks for investigating - it should work fine.  More details of what
goes wrong, and what you do to cause it to go wrong would help.

Kieran

 


reply via email to

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