From owner-freebsd-questions@FreeBSD.ORG Sun May 14 11:45:47 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98F1716A401 for ; Sun, 14 May 2006 11:45:47 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3637243D45 for ; Sun, 14 May 2006 11:45:47 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 883ED5D0D; Sun, 14 May 2006 07:45:46 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7E2vYun1+1BB; Sun, 14 May 2006 07:45:45 -0400 (EDT) Received: from [192.168.1.251] (pool-68-160-242-211.ny325.east.verizon.net [68.160.242.211]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 605575C16; Sun, 14 May 2006 07:45:45 -0400 (EDT) Message-ID: <44671864.2020001@mac.com> Date: Sun, 14 May 2006 07:45:40 -0400 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: Andrew References: <1147578337.10075.12.camel@LatitudeFC5.network> In-Reply-To: <1147578337.10075.12.camel@LatitudeFC5.network> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: VM and jailed processes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2006 11:45:47 -0000 Andrew wrote: > It's my understanding that if there is more than one instance of a > specific application running, then portions of the code are shared in > memory. I would assume that would apply to dynamically linked > applications as well; i.e. if two different applications are linked > against the same library, the given code exists in only one location in > memory. Is this correct? Yes. The details are more complicated, but the portion of an executable which contains code and does not change can be shared between many processes from only one copy in physical RAM, and likewise for shared libraries loaded by dynamic or runtime linking. > The second portion of my question is, how does this apply to jailed > processes? Looking through the architecture handbook, I did not see any > references to VM, which leads me to believe that the standard rules > apply to jails as well. So, for instance, if I was to provide a hosting > service with numerous instances of Apache running in individual jails, > could I assume that base memory usage (ie idle, not serving requests) > would increase at a roughly linear rate. > The same thing applies to jails, and the static portions of apache/httpd will only appear once in RAM, however, you are going to see roughly linear increase in memory usage depending on the number of children running, because there's anywhere from 1MB to 25MB or so of dynamic memory being used per httpd which is specific to that process, depending on which modules you're using and whether you are loading perl or PHP scripts.... -- -Chuck