lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] UDP performance


From: Leon Woestenberg
Subject: Re: [lwip-users] UDP performance
Date: Wed, 9 Jul 2003 23:56:53 +0200

Hello Kieran, Christiaan,
 
> > Have you seen a noticable drop off in performance as the number of PCBs
> increases?
> 
> I didn't test it, but this problem seems obvious to me from the code.
> (using only 4 PCBs, but this might increase when adding SNMP, DNS etc)
>
The current case is optimized towards fully bound PCBs.

Merging the loops will decrease performance for fully bound PCBs
a bit (due to the second evaluation), but increase performance for loosely
bound PCBs a bit.

(Similar lookups are done in the ARP table BTW.)

I think this is only of minor influence to our (lack of) performance issue.

Real performance testing can be done using the functionality in perf.c,
although it has not been really well maintained in the code AFAIK. 
 
> It is not only a problem if you have a large number of PCBs,
> also if the frequency of incoming packets is high.
> 
The best approach might be to optimize for temporal and spatial locality,
by moving often-referred-to PCBs at the head of the singly linked list.

Alternatively, keeping a lookup-counter for each PCB, and every once in
a while, optimize the sorting of the list according to that.

There are many schemes, they all incur overhead, and I think the keep it
simple approach works best here.
 
Regards,

Leon Woestenberg.




reply via email to

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