httpd-dev mailing list archives

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

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 
http://issues.apache.org/bugzilla/show_bug.cgi?id=23567 . 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 
avoided:

- 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.

Cheers,
Stefan

[1] 
http://mail-archives.apache.org/mod_mbox/httpd-dev/200504.mbox/<9b5d906c83b6650b9512eb9e7ac96be1%40ricilake.net>

Mime
View raw message