httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Apache memory usage
Date Mon, 03 Dec 2007 22:13:46 GMT

there is still the problem that during a request, many bucket brigades 
being created which are only cleaned up after the request is 
finished, see . There was 
some discussion about retaining ownership of a brigade when 
ap_pass_brigade() is called, and then reusing the brigades [1]. But 
this does not seem to be implemented in 2.2, yet.

But I found two locations where the creation of a new brigade could be 

- In buffer_output()/ap_old_write_filter(), it is possible to keep the 
brigade around and reuse it after the next flush.

- In ap_http_chunk_filter(), a new brigade is created for every flush 
bucket. But it is not really necessary if the flush bucket is the 
last bucket in the brigade.

I don't know yet whether the saving is significant in practice. But it
saves two brigades on every combination of ap_rwrite()/ap_rflush()  
and mod_php uses ap_r*() quite a lot.

A patch is attached. It's against 2.2.6 but applies to trunk.



View raw message