Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 71481 invoked from network); 13 Sep 2009 12:49:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Sep 2009 12:49:10 -0000 Received: (qmail 12180 invoked by uid 500); 13 Sep 2009 12:49:09 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 12093 invoked by uid 500); 13 Sep 2009 12:49:09 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 12084 invoked by uid 99); 13 Sep 2009 12:49:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Sep 2009 12:49:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 13 Sep 2009 12:49:07 +0000 Received: (qmail 71469 invoked by uid 2161); 13 Sep 2009 12:48:47 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 4073A1721C for ; Sun, 13 Sep 2009 14:48:38 +0200 (CEST) Message-ID: <4AACEA2A.2040402@apache.org> Date: Sun, 13 Sep 2009 14:48:42 +0200 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.23) Gecko/20090823 SeaMonkey/1.1.18 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Memory usage, core output filter, and apr_brigade_destroy References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/13/2009 01:11 PM, Stefan Fritsch wrote: > Hi, > > http://httpd.apache.org/docs/trunk/developer/output-filters.html > recommends to reuse bucket brigades and to not use apr_brigade_destroy. > However, both in 2.2 and in trunk, the core output filter sometimes > calls apr_brigade_destroy on brigades that it has received down the > chain from earlier output filters. Is this not bound to cause problems > since the brigade's pool cleanup is then removed but the brigade is > still reused later on? It could be. But the questions is if it is really reused later on. > > Also, the core output filter often creates new brigades instead of > reusing an existing brigade. This should also be changed to reduce > memory usage, shouldn't it? Yes. That was the reason for adding apr_brigade_split_ex to apr-util 1.3. But so far nobody has found time to get through the current httpd code and improve the needed sections by using it. > > For trunk, the attached patch at least keeps the temporary brigade for > flush buckets around. Do the versioning rules allow to add elements to > core_output_filter_ctx for 2.2.x, too? It's defined in httpd.h. Yes, if you add it to the end of the struct. Then only a minor bump is required which is allowed. The other possibly more formal problem is that we currently do not require apr / apr-util 1.3 for httpd 2.2.x but only 1.2. But after shipping 2.2.x for more then one year with apr / apr-util 1.3 without problems I guess we can change this and require apr / apr-util 1.3 for the next 2.2.x release. But your patch is causing core dumps during the proxy tests when running the test suite :-(. I currently don't understand why. Regards R�diger