httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <grega...@raleigh.ibm.com>
Subject Re: filtered I/O - flow control
Date Thu, 01 Jun 2000 19:51:48 GMT

>           If at any point there is too much data to write to
> the network, it will be up to Apache's internal buffering to catch it and
> hold it until the socket is ready.  

Seems like that could potentially cause a large increase in storage use
for huge files.  

If I understand how it works today correctly, we typically have only 2
moderately sized BUFF buffers tied up for output - one for sockets I/O,
and one for either file I/O or CGI output.  The process/thread ends up
blocking on some socket operation (select, write, writev).  When the
socket becomes ready, we unwind to ap_bwrite's caller (ap_send_fd_length
for example) who iterates a loop to read the next piece of data from the
file/CGI pipe.  This is a back pressure mechanism that limits the amount
of data that Apache needs to buffer at any instant, which I think is a
Good Thing.  I'd hate to loose it with filters.

Greg

Mime
View raw message