lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Max throughput and LWIP


From: Jonathan Larmour
Subject: Re: [lwip-users] Max throughput and LWIP
Date: Mon, 04 Feb 2008 15:04:30 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Caglar Akyuz wrote:
> Josh Rothstein wrote:
>>
>> I am current running lwIP 1.2 on an Atmel AVR32 UC3 at 66MHz.  Using the
>> sequential API with the best lwiopt.h tweaks I can come up with, I am
>> geting about 350kbps (2.8Mbps). I am not sure how the processor would
>> fair running NO_SYS using the raw api, but at the moment that is not
>> really an option.  Would that be considered good throughput or is there
>> any simple tweaks to reach anything closer to wire-speed (10Mbps or even
>> better 100Mbps)?
>>
> 
> When you say 350kbps, you mean 350 kilobytes not bits, am I right? I
> hope I did not misunderstand. Otherwise, 2.8 Mbps must be a wrong figure.
> 
> I'm using Atmel arm7 based Sam7x processor. It's highly probable that
> avr and sam families use the same pepipherals so both MACs may be same.
> I'm easly reaching 100 kBps. From some rough measurements using my
> scope, I can say that 300 kBps is the upper limit for my case. According
> to me there are two factors affecting my performance:
> 
> 1) I have only 64 KB of RAM.
> 2) TCP(or IP) checksum calculation is taking most of the processor time. (*)

I didn't reply, because I thought the hardware may be too dissimilar, but
it's also SAM7X. So in case it helps inform anything, I have also
constructed throughput test applications on SAM7X within 64K RAM (program
code in Flash though). It runs at 48MHz I think it was. With a carefully
optimised configuration using the BSD sockets compatibility API I could get
speeds up to 11 Mbit/sec on 100baseT. My driver is zero-copy (both for tx
and rx), although using the sockets API guarantees one copy. So using the
sequential or raw APIs would have meant even faster recorded speeds.

My OS was eCosPro (which is a variant of eCos) which my company sells.
Unfortunately using eCos wouldn't help you though, as I've made big changes
to the lwip support in our eCosPro variant, which is what allows the better
speeds.

But even so, if you're getting speeds as low as 2-3 Mbit/s, then there are
probably things you could do to speed things up. Especially if you have
more than 64Kbyte RAM! Not just things in your lwIP config, but also
possible things in your lwIP port, or maybe things in your OS (or your
choice of OS).

I found it useful to do packet traces (tcpdump/ethereal/wireshark/etc.) and
look at why there were delays, and tweak the various tunable values in lwIP
accordingly.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
Visit us @ Embedded World 2008, Nürnberg, Germany, 26-28 Feb:Stand 11-336
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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