lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How to optimize raw UDP performance


From: Chris Strahm
Subject: Re: [lwip-users] How to optimize raw UDP performance
Date: Thu, 24 Sep 2009 10:37:16 -0700

No, you won't see much improvement.  You are pretty much at the max on all
those, where any further increases will not add any speed.  You are not
'buffer size' limited.  You have tons of buffer size.  Adding more buffer
space when the current is not even all being used does nothing.

Since skipping the checksum increases speed, than the slower bottlenecks are
likely in your checksum and memcpy routines.  Those are generally the two
critically important areas.  Doing 16b copy is nearly 2X as fast as 8b copy.
I wrote asm routines for all my copy and checksum.  I easily got 2X or 4X
speed improvements over standard code in many of these sections.  That was
for ARM.  Working on those sections will pay big dividends.

Chris.



----- Original Message ----- 
From: "Max Bobrov" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Thursday, September 24, 2009 10:17 AM
Subject: Re: [lwip-users] How to optimize raw UDP performance


Bill: Thank you! disable CHECKSUM_CHECK_UDP and CHECKSUM_GEN_UDP gave
a considerable increase in performance. Xilinx gui interface for lwip
could use some significant improvement to make this and many other
features more accessible.

Chris: I've increased some of these values (listed below) but haven't
seen much improvement from that. Do these look ok or have you had
better success with others?

#define MEM_ALIGNMENT 8
#define MEM_SIZE 262144
#define MEMP_NUM_PBUF 32
#define MEMP_NUM_UDP_PCB 8
#define MEMP_NUM_TCP_PCB 32
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_TCP_SEG 256
#define LWIP_USE_HEAP_FROM_INTERRUPT 1

#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 256
#define PBUF_POOL_BUFSIZE 2048
#define PBUF_LINK_HLEN 16


On Wed, Sep 23, 2009 at 11:06 PM, Chris Strahm <address@hidden> wrote:
> Actually someone else reported to me that turning the checksum off in lwIP
> actually made it slower. I have not checked the reason for this, but that
> was someone else's experience. There is a big difference in whether you
use
> 8/16/32 bit memcpy type routines. Also if you can write it in asm. Since
> yours is FPGA, little different. Also same kind of thing for checksum. Asm
> will be faster. Sometimes the difference in how a particular variable or
> address pointer is generated by C can result in very big difference in
code.
> You have to look at everything when it comes to high performance.
>
> Also what is the size of your PBUFs and your blocks in your DMA or MAC
ISR.
> I assume for a 1G Enet system you probably want the maximum, about 1536
> each.
>
> Chris.
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
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]