httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: strange usage pattern for child processes
Date Wed, 15 Oct 2008 22:56:47 GMT
Ruediger Pluem wrote:

>> Something else to try is to look at the ProxyIOBufferSize parameter.
>>
>> The proxy reads from the backend in blocks, and as soon as a block is
>> not full (ie it's the last block), the proxy will complete and terminate
>> the backend request before sending the last block on to the client.
> 
> No. See below.

Oh dear - I know this optimisation is supposed to be there - I wrote it.

Picking through the proxy code on v2.2, it looks like the optimisation 
has been removed for some reason. The logic should flow like this:

do {

     ap_get_brigade()

     if (backend_is_done) {
         backend_close
         mark_we_are_done
     }

     ap_pass_brigade()

} while(not_yet_done)

This makes sure that for reasonable sized requests, the 
probably-expensive backend is released immediately, before any time is 
invested shipping the response to the potentially-slow client.

Obviously, if the loop comes round more than once, then the client comes 
into play. This definitely needs to be fixed, it is a big performance issue.

Regards,
Graham
--

Mime
View raw message