Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 83262 invoked by uid 500); 1 Apr 2003 20:55:12 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 83241 invoked from network); 1 Apr 2003 20:55:11 -0000 X-Authentication-Warning: localhost.localdomain: dmitri set sender to dmitri@netilla.com using -f Date: Tue, 1 Apr 2003 15:55:36 -0500 From: Dmitri Tikhonov To: dev@httpd.apache.org Subject: MaxMemFree: kilobytes or megabytes? Message-ID: <20030401205536.GB25443@netilla.com> Mail-Followup-To: dev@httpd.apache.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm seeing some weird things happening with MaxMemFree directive (http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxmemfree). The docs say that this directive specifies the number of kilobytes after which the memory is returned back to the system, but I found evidence to the contrary: On start-up, the size of my Apache process is 20 MB (so large because of mod_perl and many preloaded Perl modules). An output filter allocates about 7 MB. When MaxMemFree is set to either 1024 (supposedly 1 MB) or 10, the memory is not freed. When it is set to 1, 2, or 4, the memory is freed and the process is back to 20 MB. When it's set to 5 or 6, the memory is not freed. The question is, is it really kilobytes, megabytes, or something else? The code is quite complex, and I was not able to trace it all the way and figure out exactly what is going on. I tested this with 2.0.43 and 2.0.45; the filter uses f->r->pool. Thanks, - Dmitri.