httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: non-buffered CGIs suck
Date Fri, 06 Mar 1998 04:21:34 GMT


On Thu, 5 Mar 1998, Marc Slemko wrote:

> Why should it have any significant impact at all on them?  Heck, you have
> less overhead when there is a delay of less than the select timeout
> because you avoid pointless flushes.  When it does timeout and go to
> block, you have one extra syscall overhead.
> 
> What other overhead is there?

4k chunks never get buffered.  So waiting 100ms for each of them hurts
overall throughput. 

> Remember prior to 1.1?  We had Nagle enabled.

Doesn't help in all cases though.  But point taken.  How do things look if
you re-enable Nagle?

And maybe I should check your script on Linux to see if it's another
freebsd feature ;)  (couldn't resist ;) 

> > And I still disagree with every single CGI FAQ that says "set $| =1; in
> > your perl scripts".  I've never understood why that is there.  I never
> > seem to require it.  At least our FAQ explains that you should turn
> > buffering back on. 
> 
> If you do anything that mixes non-buffered and buffered IO you need it or
> something similar.  If you do:
> 
> print "Content-type: text/plain\n\n";
> system("/bin/hostname");
> 
> you need it.

Yeah you're right, I guess I don't write these sort of lame CGIs so I
never run into it. 

Dean



Mime
View raw message