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 855A0200CC5 for ; Tue, 27 Jun 2017 01:51:56 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 83F2D160BDE; Mon, 26 Jun 2017 23:51:56 +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 C98BF160BDA for ; Tue, 27 Jun 2017 01:51:55 +0200 (CEST) Received: (qmail 94736 invoked by uid 500); 26 Jun 2017 23:51:55 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 94726 invoked by uid 99); 26 Jun 2017 23:51:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2017 23:51:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6BE03C061B for ; Mon, 26 Jun 2017 23:51:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.002 X-Spam-Level: X-Spam-Status: No, score=-0.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 82bvEUa0QrFD for ; Mon, 26 Jun 2017 23:51:52 +0000 (UTC) Received: from mail.nilspace.com (spidey.nilspace.com [69.59.196.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id F01F05F54F for ; Mon, 26 Jun 2017 23:51:51 +0000 (UTC) Received: from [192.168.1.100] (c-71-238-20-10.hsd1.or.comcast.net [71.238.20.10]) (authenticated bits=0) by mail.nilspace.com (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v5QNphUm008117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 26 Jun 2017 16:51:43 -0700 Subject: Re: AW: Embperl and threaded mpm? To: richter@ecos.de Cc: "embperl@perl.apache.org" References: <59500A1A.5040505@nilspace.com> From: Neil Gunton Message-ID: <59519E0F.8060807@nilspace.com> Date: Mon, 26 Jun 2017 16:51:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit archived-at: Mon, 26 Jun 2017 23:51:56 -0000 richter@ecos.de wrote: > Hi Neil, > > Embperl is not working with threaded mpm. > > Preloading all your perl code saves a lot of memory due to code sharing. > > The main issue is, that you have to make sure, not to open any file or database connection or similar in the preload code, because that will be shared too, which does not work Thanks, Gerald. So, just to be clear, what my preload routine in startup.pl does is the following. Maybe you can confirm that I'm doing it right. if (Apache2::ServerUtil::restart_count() == 1) { preload_dirs(); $Embperl::initparam{preloadfiles} = \@preload_files; } The preload_dirs() simply traverses my code tree and calls this for each file: push (@preload_files, {inputfile => $filename, path => $path, import => 0, input_escmode => 0, options => 16, debug => 0x7fffffff}); Does that look about right? If as you say it's worthwhile in terms of memory then I might look at re-enabling it again. I think I disabled it originally because it made restarting the server quite slow, but it would be useful to have it as an option should I need it. Thanks! Neil --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org