Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 43836 invoked from network); 25 Oct 2008 18:52:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Oct 2008 18:52:33 -0000 Received: (qmail 23016 invoked by uid 500); 25 Oct 2008 18:52:32 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 22993 invoked by uid 500); 25 Oct 2008 18:52:32 -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 22982 invoked by uid 99); 25 Oct 2008 18:52:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Oct 2008 11:52:32 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.126.186] (HELO moutng.kundenserver.de) (212.227.126.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Oct 2008 18:51:20 +0000 Received: from [192.168.178.20] (koln-4db4ad31.pool.einsundeins.de [77.180.173.49]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1KtoEJ2bqw-0001bb; Sat, 25 Oct 2008 20:51:22 +0200 Message-ID: <49036AA3.5060501@lackhoff.de> Date: Sat, 25 Oct 2008 20:51:15 +0200 From: Michael Lackhoff User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Clinton Gormley CC: modperl@perl.apache.org Subject: Re: Reducing memory usage using fewer cgi programs References: <645570.50168.qm@web31001.mail.mud.yahoo.com> <4901C7B8.3040202@plusthree.com> <4902999D.2060402@lackhoff.de> <1224934445.3296.28.camel@getafix.traveljury.com> In-Reply-To: <1224934445.3296.28.camel@getafix.traveljury.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX1/RvsQXeIxSaRSa9lvAh9pRrQobP/ATRVime35 j8GcIbMDaDb2YRZBXebbHbT8LAXNylqzMvMvavhvhRJ5j7DPae TL0+GEFrSjwC3x284qVCw== X-Virus-Checked: Checked by ClamAV on apache.org On 25.10.2008 13:34 Clinton Gormley wrote: > I think there was some confusion here about what was being said. > > Michael Peters' comment about memory reuse was saying that: > - if at runtime, you load a large memory structure > - then let those variables go out of scope > - then that memory will be come available for reuse by Perl > > but > - if you load that same large memory structure at server startup > - and the variables don't go out of scope, > - then that memory stays used Indeed, looks like I misunderstood what Michael Peters was saying. > This makes forking a new child very fast, thanks to copy-on-write in > linux. This is what I am after. > Unfortunately, in Perl, there is no way to make sure that > data-that-will-never-change and compiled code is stored on a separate > page from data-that-will-change. So, it is likely that, while your > config data starts out completely shared, over time, it will become less > so. Good hint. I will have to see how I can limit this non-shared memory, if need be by restarting the server from time to time to restore the initial state with almost all memory shared. (Or better by reducing MaxRequestsPerChild as you suggest) > You may want to look at Linux::Smaps I am not that far, yet. I am doing all my development work under Windows and only for production I will use Linux (or Solaris if it needs bigger iron). Thanks (also to André) -Michael