|
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 The TCP's tx bandwidth is greatly affected by the size of
payload for lwip_send. Subject: Re: [lwip-users] Re: lwip-users Digest, Vol 67,
Issue 5 |
[Prev in Thread] | Current Thread | [Next in Thread] |