|Subject:||[lwip-users] Bad TCP throughput, delayed send frames|
|Date:||Mon, 7 Feb 2005 19:26:33 +0100|
I'm using LWIP 0.7.1 on an XC16x with the raw interface and Leon Woestenbergs CS8900A driver. Currently LWIP runs singlethreaded and by polling, without any interrupts from the ethernet controller.
So periodically I'm doing this:
Every 10 ms I'm calling the netif service routine, thats cs8900if_service() in this case.
Every 250 ms I'm calling tcp_tmr().
And every 10 s I'm calling etharp_tmr().
My problem's that I need a throughput of at least 50 KByte/s, but the TCP Handshake runs very, very slow and depends on how often I'm calling tcp_tmr().
I have a testsuite sending a 2K block of data back and forth, mixed with some shorter telegrams in between.
If I'm calling - as I should - tcp_tmr() every 250 ms, it seems that every call to tcp_write() is delayed by about 250 ms before any data appears on the ethernet. This results in a total of more than 1000 ms for a single testcycle.
But if I call tcp_tmr() - what I usually should not do (?) - every 10 ms, together with cs8900if_service(), then the delay is much smaller and one testcycle needs approx. 160 ms only. In this case - of course - I have a lot of retransmissions sent by lwip due to a wrong TCP timing.
So it seems that the delay I mentioned above is corresponding to the cycle time of tcp_tmr(). I'm far away from being a network or even lwip expert and this is something I definitely don't understand.
What am I doing wrong? Do you have any ideas? If this is 'normal', what can I do to increase the throughput without changing the tcp_tmr intervall?
Thanks in advance.
|[Prev in Thread]||Current Thread||[Next in Thread]|