Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A942A200D19 for ; Fri, 6 Oct 2017 09:46:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A7B901609DF; Fri, 6 Oct 2017 07:46:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EE5831609D0 for ; Fri, 6 Oct 2017 09:46:44 +0200 (CEST) Received: (qmail 21012 invoked by uid 500); 6 Oct 2017 07:46:43 -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 21003 invoked by uid 99); 6 Oct 2017 07:46:43 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2017 07:46:43 +0000 Received: from gauss.localdomain (unknown [217.61.196.29]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 8F3491A0117 for ; Fri, 6 Oct 2017 07:46:41 +0000 (UTC) Received: from [IPv6:::1] (localhost [IPv6:::1]) by gauss.localdomain (Postfix) with ESMTP id 51B242F7 for ; Fri, 6 Oct 2017 09:46:39 +0200 (CEST) To: Apache HTTP Server Development List From: Ruediger Pluem Subject: httpd memory consumption Message-ID: <06a0b5ba-aa10-7352-d08d-5856abd077a7@apache.org> Date: Fri, 6 Oct 2017 09:46:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit archived-at: Fri, 06 Oct 2017 07:46:45 -0000 I am currently looking at a core of a httpd 2.4 process using the event MPM that consumed a lot of memory (core dump file size about 1.4 GB). While taking the core actually no request was processed by this process. I suspect a memory leak in a 3rd party closed source module. As I have no view in the 3rd party module I tried to find out the heap memory usage of httpd and the included modules. For this I used the new dump_pool_and_children I added to .gdbinit which delivers me the memory used by all pools below 'apr_global_pool' and the amount of memory in the allocator free lists associated to these pools. This delivered a usage of only a few MB. Of course I am aware that the process consumes additional memory for stack, static data and text segments, but this usage should be static. Is there any heap usage by httpd that I could have missed? - We do not use the unmanaged pools from APR. So I should have caught all pools. - I do no think that we use allocators that are not used by a pool. Hence I should have caught all allocators and its free lists. - As no request was processed when I captured the core (all worker threads were waiting for work) I doubt that missed any or at least large memory consuming buckets. So possible other consumers of memory apart from the 3rd party module that come to my mind: - Could any of the glibc (httpd was running on a Linux system) functions wrapped by APR consume a lot of memory? - As far as I researched glibc by default should return memory to the OS if more then 128 KB are free at the top of the heap. Regards RĂ¼diger