Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 37357 invoked from network); 7 Dec 2007 10:24:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 10:24:19 -0000 Received: (qmail 50668 invoked by uid 500); 7 Dec 2007 10:24:06 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 50617 invoked by uid 500); 7 Dec 2007 10:24:06 -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 50606 invoked by uid 99); 7 Dec 2007 10:24:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 02:24:05 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justin.erenkrantz@gmail.com designates 64.233.184.232 as permitted sender) Received: from [64.233.184.232] (HELO wr-out-0506.google.com) (64.233.184.232) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 10:23:45 +0000 Received: by wr-out-0506.google.com with SMTP id 37so481935wra for ; Fri, 07 Dec 2007 02:23:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=WkMVQnVUqwbns7aJg8XohWA7YXxkNJU7q7uUaeWV35E=; b=NAeggqTVEd9XKCu3rIhWxXkxlaUSUgE8eV6lKdWNxsSd48H28E1pKVHalhu2LAYXVHTyS5FTWshtf5jWgrECq7YCslGQ4NbbMSvnOoHRY17tVGYsX1P5c1voSPC6eVadvXwFKIQCCy/GVp/5BhVWQDjFTDQb5RgyIua9ALnoba0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=BCqwRmezK4OUUJXQSdEo5qaJxNX+x4Ym4MZ6oq1j9RuS7DkYk+RrytPXHZiABZUSdA2sGBLyHA2pzfXxGMclKnBeXGmGbEDV9yZizpiban11GwK4cuBNW11Gcs8dr3bdIZ4Kv3+uZi4yMEn5QcuTuSiK/LKI5Ln3cpdg+s3AtjA= Received: by 10.150.146.14 with SMTP id t14mr1485469ybd.1197023026955; Fri, 07 Dec 2007 02:23:46 -0800 (PST) Received: by 10.150.144.10 with HTTP; Fri, 7 Dec 2007 02:23:46 -0800 (PST) Message-ID: <5c902b9e0712070223s38a952aw9b7ba0500d6ed9d6@mail.gmail.com> Date: Fri, 7 Dec 2007 02:23:46 -0800 From: "Justin Erenkrantz" Sender: justin.erenkrantz@gmail.com To: dev@httpd.apache.org Subject: Re: Memory consumption of mod_substitute In-Reply-To: <99EA83DCDE961346AFA9B5EC33FEC08B05B290@VF-MBX11.internal.vodafone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <99EA83DCDE961346AFA9B5EC33FEC08B05B290@VF-MBX11.internal.vodafone.com> X-Google-Sender-Auth: f3768a64c8d8450b X-Virus-Checked: Checked by ClamAV on apache.org On Dec 5, 2007 8:36 AM, Pl=FCm, R=FCdiger, VF-Group wrote: > * My test case lead to the exceptional situation of a very large passbb b= ucket brigade > (about 1,000,000 buckets) as a result of processing 4 MB of the file. S= o I add > a flush bucket once I have more than MAX_BUCKET (1000) buckets in the b= rigade and pass it > down the chain to get it send and the passbb bucket brigade cleaned up = and its memory > reusable again. Ha! Is there a way we could be more aggressive in minimizing the number of buckets mod_substitute creates? Perhaps using apr_bucket_copy to create ref-counted versions of the replacement string? > Comments, thoughts? Your patch looks good on a quick cursory review. -- justin