|
From: | Wei Bo-Er \(Jason\) |
Subject: | [lwip-users] TCP performance in receiving |
Date: | Fri, 8 Oct 2004 17:05:28 +0800 |
Hi All,
I am using lwip 1.0.0 and meet a
problem in TCP performance. I found that TCP performance much
dependents on usage of connection.
A connection which sends &
receives packets alternately will get much higher
perfoemance than the one which only receives packets.
This seems due to that
tcp_ack will always set pcb->flag to
TF_ACK_DELAY in tcp_receive. I guess doing so is for
waiting to see if
there is any packet to be sent later and ack can also
be sent in that packet. But as a connectionis is always
in recving packets, each ack will
always delay about 250ms and then it
can be sent. This will much reduce TCP performance.
I'm not sure what is best solution about this
question. I just reduce TCP_FAST_INTERVAL from 250ms to 50ms. It really works
and gets
about five times performance than before. But I'm afread this
will also increase tcpip_thread loading in processing too much useless
timeout
as there is no connection which is only in
receiving packets. I'm not expert in TCP,so I think there may be someone
can give me a better solution
than what I did.
Regards,
Bo-Er
|
[Prev in Thread] | Current Thread | [Next in Thread] |