buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49976, Some performance issue

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #49976: Some performance issue

Submitted by:  Wen Xichang <wenxichang>
Submitted on:  Tue 03 Jan 2017 04:44:06 AM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Feature RequestStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: 2.0.0

Tue 24 Jan 2017 09:44:30 AM UTC, comment #2:

After all, this is not a bug. Please post patches (we can't afford to develop them for you, currently) for your ideas to have a clean place for discussion.

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 04 Jan 2017 02:09:36 PM UTC, comment #1:

Up to now, we have deliberately chosen small size over performance. In the last years, however, lwIP seems to attract more and more people not caring for the "lightweight" in our name (mainly since there seems to be no decent free alternative even for higher performance?)

In the end, I'm open for such a change as long as it's optional (i.e. no code & ram increasement for those wanting low resource usage). Plus I won't work on that, but patches to be discussed here are always welcome.

Simon Goldschmidt <goldsimon>
Project Administrator
Tue 03 Jan 2017 04:44:06 AM UTC, original submission:

1. find a free socket seem not efficient (sockets.c: alloc_socket)
why not add a free list like:

int free_socks[NUM_SOCKETS];
int num_free_socks;

alloc_socket:
if (num_free_socks <= 0)
return EMFILE;
num_free_socks--;
s = free_socks[num_free_socks]

this improvement take only (NUM_SOCKETS + 1) int ram.

2. tcp_active_pcbs, why not use hash, a 64-slots-hash will greatly improve perf, only extra 63 pointers taken.

3. socket_event should expose some API so that developer can easily impl their own poll/epoll/kqueue, like:

typedef void (lwip_sock_event_cb)(int sock, int readable, int writeable, int exception, void userdata);
int lwip_sock_reg_event_cb(lwip_sock_event_cb cb, void *userdata);

Wen Xichang <wenxichang>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by wenxichang (Submitted the item)
  • -unavailable- added by wenxichang
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Jan 2017 09:44:30 AM UTCgoldsimonStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Tue 03 Jan 2017 04:44:06 AM UTCwenxichangCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1