lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Speed of LwIP ?


From: filter002
Subject: Re: [lwip-users] Speed of LwIP ?
Date: Mon, 13 Dec 2004 20:02:25 +0100

I am using lwip 0.71, ported to a AT91RM9200 (160MHz ARM9, 100 MBit
Ethernet). It's doing constant "video streaming" with 9MByte/s via TCP.

I did a optimized lwip_chksum with some assembly, and inline asm for the
hton... functions.

I vamped a sampling profiler giving me this result:


     23728 (72.4%): 20979408
        4374 (18.4%): mymemcpy(void*, void const*, unsigned long)
        3968 (16.7%): data_service_interrupt(void*)
        3114 (13.1%): lwip_chksum
        2407 (10.1%): CEmacserv::relay(CPThread&, unsigned int, void*)
        1053 ( 4.4%): etharp_output
         893 ( 3.8%): tcp_input
         767 ( 3.2%): tcp_output
         706 ( 3.0%): tcp_enqueue
         509 ( 2.1%): ip_output_if
         483 ( 2.0%): CPThread::clearflag(unsigned int)
         411 ( 1.7%): pbuf_alloc
         386 ( 1.6%): CEmacserv::at91rm9200_emac_input(netif*)
         375 ( 1.6%): ip_input
         370 ( 1.6%): inet_chksum_pseudo
         338 ( 1.4%): CEmacserv::thread(unsigned int, void*)
         309 ( 1.3%): pbuf_header
         299 ( 1.3%): etharp_tmr
         291 ( 1.2%): CServtpc::send(bool)
         260 ( 1.1%): mem_malloc
         208 ( 0.9%): pbuf_free
         171 ( 0.7%): ip_output
         156 ( 0.7%): mem_free
         150 ( 0.6%): Port_bit_base::get_port() const
         147 ( 0.6%): timer_interrupt_int(void*)
         138 ( 0.6%): memcmp
         133 ( 0.6%): memp_malloc
         130 ( 0.5%): pbuf_realloc
         126 ( 0.5%): tcp_write
         124 ( 0.5%): CPThread::finished_func()
         118 ( 0.5%): Port_bit_base::set_mode(int, bool)
         107 ( 0.5%): tcp_seg_free
         101 ( 0.4%): __divsi3
          92 ( 0.4%): etharp_ip_input
          84 ( 0.4%): inet_chksum
          66 ( 0.3%): memp_free
          47 ( 0.2%): Port_bit_base::get_pull(int)
          42 ( 0.2%): pbuf_cat
          41 ( 0.2%): CPThread::tswitch_protected(unsigned long)
          37 ( 0.2%): CServ_http::send(bool)
          33 ( 0.1%): pbuf_clen
          32 ( 0.1%): CLwip::sent_relay(void*, tcp_pcb*, unsigned short)
          30 ( 0.1%): hal_us_delay(int)
          24 ( 0.1%): FS_reg_bits<132, 0, 0, 0>::operator=(unsigned char)
          19 ( 0.1%): timer_interrupt(unsigned int)
          13 ( 0.1%): Port_bit_base::set(int, bool)
          12 ( 0.1%): FS_stat_bits<134, 0, 0, 0>::operator()()
           9 ( 0.0%): CLwip::sent(unsigned short)
           8 ( 0.0%): FS_unit::timer_interrupt()
           5 ( 0.0%): memcpy
           5 ( 0.0%): lwip_at91rm9200_timer_interrupt()
           4 ( 0.0%): ir_service_int(unsigned short, bool, unsigned char)
           1 ( 0.0%): timer_interrupt(void*)
           1 ( 0.0%): infieldbuffer()
           1 ( 0.0%): tcp_slowtmr




My preemptive task running lwip uses 72.4% CPU for that.
'mymemcpy' + 'data_service_interrupt' is not within lwip.
'lwip_chksum' is my optimized checksum.

As you can see the functions within the lwip library use the lesser part of
cpu in this system.

You might roughly scale this to your target.

I use gcc 3.4.3 with -O2.

Raymund Hofmann

-----Ursprüngliche Nachricht----- 
Von: "Lasse Madsen" <address@hidden>
An: "'Mailing list for lwIP users'" <address@hidden>
Gesendet: Freitag, 3. Dezember 2004 04:47
Betreff: [lwip-users] Speed of LwIP ?


> Hi all,
>
> All though I've never used LWIP but been a member here for quite some time
> "lurking in the dark" and dreaming about great home projects to come I've
> come across a question which I cant find out unless I had a chance to try
> LwIP.
>
> If I wanted to stream MP3 from a Shoutcast server on the internet and use
> LwIP to connect to the TCP stream how fast a processor should one choose?
>
> What my concern is can LwIP handle 128KB/per sec. plus the (unknown)
> shoutcast overhead and LwIP's own code?
>
> I guess you guys who are using it can be the only ones to tell if it's a
> realistic "goal" to obtain that data transfer rate
>
> I was thinking of a Philips LPC series ARM processor running at 60MHz with
> ALOT of external memory for buffering the audio and constantly sending the
> received audio to an external MP3 decoder chip.
>
> Has anyone tried to transfer large amounts of data through LwIP what
> transfer rates did you get and on which platforms?
>
> Regards
> Lasse Madsen
>
>
>
> _______________________________________________
> 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]