Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 89617 invoked from network); 30 Sep 2009 18:15:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Sep 2009 18:15:08 -0000 Received: (qmail 53490 invoked by uid 500); 30 Sep 2009 18:15:04 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 53434 invoked by uid 500); 30 Sep 2009 18:15:04 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 53345 invoked by uid 99); 30 Sep 2009 18:15:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2009 18:15:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pharkins@gmail.com designates 74.125.92.144 as permitted sender) Received: from [74.125.92.144] (HELO qw-out-1920.google.com) (74.125.92.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2009 18:14:55 +0000 Received: by qw-out-1920.google.com with SMTP id 5so4163057qwc.40 for ; Wed, 30 Sep 2009 11:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jk2cuk8i5lBn0uUECYfmYXrlI9wEunD10mI1OfyjX7s=; b=vhHnfN4kYnh5979P3mnO4Td4whIiAHqGP1r7vtFc0+uF1qXFdS1f0qlkmz4XNhIdmH +R4EdoleFAStU8Pt6gb5tEPFqTTYz24/9+YZ8GNJqHAAv+1qx9njg19pJFKu4Sk2+NdR yRcaYBasjUGieMFG2LUaH/9fofy/eM3B+QvB0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IRoJ+Yv18y97PhJE9f1uF2XWCYxP/rp2tTlskdoxiBNeUnUTOAf0gUDZSckkhbF6kp Tpk/lJGaB8m/HMpRo51VyfTrjMSgYySnhAj5H4jzJ9RfHpqfpAvo4LNOUXxABXDChH15 +2d4z3a7A3VMJGbqSUBuw7ac9ZuKxzR/Y7qYc= MIME-Version: 1.0 Received: by 10.229.19.149 with SMTP id a21mr179371qcb.29.1254334474126; Wed, 30 Sep 2009 11:14:34 -0700 (PDT) In-Reply-To: <1254322051.3073.79.camel@getafix.traveljury.com> References: <0094B21B98DE344AA3595024C4EAE90B2522C2A423@UK-EXCHMBX1.green.sophos> <1254322051.3073.79.camel@getafix.traveljury.com> Date: Wed, 30 Sep 2009 14:14:34 -0400 Message-ID: <66887a3d0909301114j77546333lcfbcbc00fa8732ad@mail.gmail.com> Subject: Re: huge httpd processes From: Perrin Harkins To: Clinton Gormley Cc: Justin Wyllie , "modperl@perl.apache.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Sep 30, 2009 at 10:47 AM, Clinton Gormley wr= ote: >> Do either of these bear any relation to mod_perl's shared memory which >> you can use by preloading modules at startup? > > Yes - as I understand it (somebody please correct me if I'm wrong), all > of the C libraries (eg XS modules) that you preload will remain shared > between your processes. =A0Also, your heap (Perl code and vars) will star= t > off as shared in a new process. =A0As each page in the heap becomes dirty= , > the heap will become less shared. The short answer is that absolutely everything starts off shared whenever you fork any program, because of copy-on-write. Over time, as pages get written to, they are no longer shared. > But given that forking a new process is cheap with copy-on-write, just > make sure that your children exit on a regular basis, eg after 1000 > requests. I'd start with something really low and work up, like 10 requests, or use Apache::SizeLimit. - Perrin