Bill,
As we suspected based on this information, setting the TF_NODELAY flag in the 
accept callback did not make a difference.  Apparently the problem is somewhere 
else in the stack but not sure where.  I tried both MSIE and FoxFire browsers, 
same results.  I just can't figure out why there is so much delay between the 
http_sent() functions.  It appears that this is somehow related to the lwip 
either not sending the tcp_write()/tcp_output() immediately or not processing 
the response packets quickly (or maybe a combination of both).  At any rate it 
appears that httpd module can only serve up one chunk of the file about every 
200msec.  If you think of anything else please let me know.
Rick

  ----- Original Message ----- 
  From: Bill Auerbach 
  To: 'Rick Culver' ; 'Mailing list for lwIP users' 
  Sent: Friday, April 24, 2009 9:56 AM
  Subject: RE: [lwip-users] httpd slow response


  Ok.  Than as Simon pointed out - the tcp_output avoids Nagle.  I followed the 
contrib/apps httpd example and without tcp_output calls I needed TF_NODELAY.

   

  Which is right?  I would hope that an lwIP contrib example would show the 
correct way to implement something.

   

  Bill

   

  From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Rick Culver
  Sent: Friday, April 24, 2009 10:08 AM
  To: Bill Auerbach; 'Mailing list for lwIP users'
  Subject: Re: [lwip-users] httpd slow response

   

  Bill,
  I will try this in the accept call back and advise the results.  The httpd.c 
module we are using is one that was supplied by Luminary Micro with their 
function library.  It was modified from the one provided in contrib/apps to 
include some SSI functionality (which we have disabled).  Basically the 
"send_data" function includes a call to tcp_output() just before the final 
return if any data was sent.

  Rick

   

    ----- Original Message ----- 

    From: Bill Auerbach 

    To: 'Rick Culver' ; 'Mailing list for lwIP users' 

    Sent: Friday, April 24, 2009 7:41 AM

    Subject: RE: [lwip-users] httpd slow response

     

    Rick,

     

    I did this in the accept callback.  I haven't seen an lwipopts method to do 
this.  Which httpd server?  The one in lwIP contrib/apps doesn't have the 
tcp_output you mention.

     

    Bill.

     

    From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Rick Culver
    Sent: Friday, April 24, 2009 8:23 AM
    To: Bill Auerbach; 'Mailing list for lwIP users'
    Subject: Re: [lwip-users] httpd slow response

     

    Bill,

    Thanks for the prompt response.  That would make sense to me.  Where/how 
would I include this in the code?  Do you know if there is a way to change this 
in the lwipopt.h file?  I do see that the httpd server does include the 
tcp_output() function write after a tcp_write(), would that not negate the 
nagle delay anyway?  What do you think?

    Rick

     

      ----- Original Message ----- 

      From: Bill Auerbach 

      To: 'Rick Culver' ; 'Mailing list for lwIP users' 

      Sent: Thursday, April 23, 2009 5:07 PM

      Subject: RE: [lwip-users] httpd slow response

       

      Raw API doesn't disable Nagle.  I found things to be faster if I do so:

       

      pcb->flags |= TF_NODELAY;                                        //       
     Disable Nagle

       

      Bill

       

      From: [email protected] 
[mailto:[email protected]] On Behalf Of 
Rick Culver
      Sent: Thursday, April 23, 2009 4:05 PM
      To: [email protected]
      Subject: [lwip-users] httpd slow response

       

      I am using lwip with raw API and the httpd web server.  I noticed that 
when serving up larger files that the response seemed extremely slow.  The 
http_sent() callback is used to send each new chunk of the file being served 
and I discovered that it is taking about 175msec between the http_sent() 
callbacks.  What could be causing this huge delay in response?  Any ideas would 
could be wrong and/or how we can speed up this otherwise slow server?

       
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to