lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] LWIP configuration to maximize TCP throughput givenRAM


From: Bruce Sutherland
Subject: RE: [lwip-users] LWIP configuration to maximize TCP throughput givenRAM constraints
Date: Wed, 15 Oct 2008 13:26:34 +0800

Hi Piero,
 
Thanks for sharing your file. This is a good starting point for discussion.
A couple of important differences between our system and yours:
 
1) We do not run an operating system, and define NO_SYS = 1. Hence we do not
use the mailboxes like you do.
2) I think you may be using a slightly different version of LWIP to us. We
are using STABLE-1.3.0.
3) We use the raw API, not the sockets API.
 
Now, I looked at all your options and how they differ from defaults. Changes
you made which seem most likely to affect TCP performance are as follows:

TCP_MSS increased from 128 to 1460
TCP_SND_BUF correspondingly increased to 1460 * 2
TCP_SND_QUEUELEN increased from 8 to 16
TCP_LISTEN_BACKLOG enabled
TCPIP_THREAD_STACKSIZE set from 0 to 200
TCP_MBOX options set

I will try these in our code and see how performance is affected.

Regards,

Bruce


________________________________

        From:
address@hidden
[mailto:address@hidden
On Behalf Of Piero 74
        Sent: Tuesday, 14 October 2008 8:08 PM
        To: Mailing list for lwIP users
        Subject: Re: [lwip-users] LWIP configuration to maximize TCP
throughput givenRAM constraints
        
        
        Hi bruce 

        My project is build above lpc2365 (the same ram size)

        I reserved 6k for emac dma driver (3k for tx, 3k for rx).
        I used other ram available in ethernet ram for allocation of buffers
for application related to uarts (0 and 2) manager and tcp manager and udp
manager and for a task which acts as protocol converter (we are using
proprietary protocols)

        I tried my code with some test software build myself, to test
throughput . I haven't a value for you, because my goal was only try to
stress the application fw, because in real situation our chain (pc app, ip
board, serial device) works using halfduplex communication (send a packet
and wait for answer) and serial device cannot work with a speed greater than
115200.

        Anyway, i attached my lwipots.h file

        we can discuss about it, here.

        Bye,
        Piero 

        2008/10/14 Bruce Sutherland <address@hidden>
        

                Hi everyone.
                
                We are using lwip on an embedded target (LPC2368
microcontroller).
                
                We have successfully used lwip to act as a serial device
server. That is to
                say, we accept data via a TCP connection on an Ethernet
link, and transmit
                the data out on an RS-232 serial port.
                
                Now, our goal is to maximize throughput over the link. My
impression is that
                maximum TCP throughput is limited by lwip configuration
options. These
                options are mostly constrained by the available memory. This
means that
                maximum throughput is some function of memory size, capped
by any other
                bottlenecks in a system, something like this:
                
                http://er6australia.com/images/tcp_thruput_vs_memory.png
                
                My question is: given a certain amount of free RAM, how
should lwip options
                be configured for best throughput?
                
                Say for example, we have 10 kb of RAM available for lwip to
use. How should
                we set options such as MEM_SIZE, MEMP_SANITY_CHECK,
MEMP_OVERFLOW_CHECK,
                TCP_WND, TCP_QUEUE_OOSEQ, TCP_MSS and so on? I know this is
quite a broad
                question. Links to discussions of this subject would be
welcomed.
                
                Regards,
                
                Bruce.
                
                
                
                _______________________________________________
                lwip-users mailing list
                address@hidden
                http://lists.nongnu.org/mailman/listinfo/lwip-users
                







reply via email to

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