lwIP optimization questions.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

lwIP optimization questions.

Roger Cover
Greetings,

I have implemented an HTTP server using lwIP on a Xilinx Virtex-4 device
using the PowerPC 405 embedded processor. My system provides ARP, ICMP and
UDP services in addition to the HTTP service. My system contains 32K of very
fast (100MHz access) on-chip RAM, 64M of slow (10MHz access) external RAM,
and 4M of FLASH. The system is working well and transfers data at about 3.5M
Bytes/second.

I would like to improve the performance of the transfers. One way I can do
this is to move critical variables into the fast RAM. Since I am new to
lwIP, I do not know which variables are critical to the operation of the
TCP/IP and UDP functions. Can anyone give me some guidance on this issue?

Regards,
Roger W. Cover
Spectral Instruments, Inc.
420 N. Bonita Ave.
Tucson, AZ 85745
Voice: 520-884-8821 ext. 144
FAX: 520-884-8803






_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: lwIP optimization questions.

Kieran Mansley
On Thu, 2006-10-19 at 09:18 -0700, Roger W. Cover wrote:

> Greetings,
>
> I have implemented an HTTP server using lwIP on a Xilinx Virtex-4 device
> using the PowerPC 405 embedded processor. My system provides ARP, ICMP and
> UDP services in addition to the HTTP service. My system contains 32K of very
> fast (100MHz access) on-chip RAM, 64M of slow (10MHz access) external RAM,
> and 4M of FLASH. The system is working well and transfers data at about 3.5M
> Bytes/second.
>
> I would like to improve the performance of the transfers. One way I can do
> this is to move critical variables into the fast RAM. Since I am new to
> lwIP, I do not know which variables are critical to the operation of the
> TCP/IP and UDP functions. Can anyone give me some guidance on this issue?

Most critical variables will be on the stack, and so ensuring this is in
fast RAM would be my first port of call.  I would then start to look at
writing an efficient checksum algorithm, and ensure that any data copies
(I'm not sure which API you're using - some involve more copies than
others) are done to and from your fast RAM.  Most of the rest of the
memory used by lwIP is in the mem.c memory pool, which is just a
statically allocated chunk that is then divided up for various purposes.
This should be quite straightforward to experiment with - just arrange
for it to be allocated from each of the regions of memory you have and
run a benchmark.

Hope that helps,

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users