From owner-freebsd-questions@FreeBSD.ORG Sun May 14 18:07:06 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 6555916A419 for ; Sun, 14 May 2006 18:07:06 +0000 (UTC) (envelope-from andrew.chace@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B7D43D68 for ; Sun, 14 May 2006 18:06:59 +0000 (GMT) (envelope-from andrew.chace@gmail.com) Received: by nz-out-0102.google.com with SMTP id s18so12304nze for ; Sun, 14 May 2006 11:06:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=g6pjLzyxbJE+8TCTBkbygR2T6aAQocDDyyBgbLHjsuU3oY3fNnynnJR9hbgN6SRCOhcKhtnqncfIs04Jl5b27MerArdMHm0ZNYEtJGrTvK3g2EimtyKG+TpzwmbqlL85BufPFVafQu/YK/r2DWaAszd51eeN5of0UDpZTsZXBEk= Received: by 10.36.247.45 with SMTP id u45mr2058963nzh; Sun, 14 May 2006 11:06:59 -0700 (PDT) Received: from ?192.168.0.6? ( [71.38.163.167]) by mx.gmail.com with ESMTP id j4sm6278588nzd.2006.05.14.11.06.58; Sun, 14 May 2006 11:06:58 -0700 (PDT) From: Andrew To: Chuck Swiger In-Reply-To: <44671864.2020001@mac.com> References: <1147578337.10075.12.camel@LatitudeFC5.network> <44671864.2020001@mac.com> Content-Type: text/plain Date: Sun, 14 May 2006 13:05:15 -0500 Message-Id: <1147629915.10075.27.camel@LatitudeFC5.network> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) 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 18:07:06 -0000 On Sun, 2006-05-14 at 07:45 -0400, Chuck Swiger wrote: > 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.... > Hi Chuck, Thank you for the clarifications. It seems as though this will work quite well; the hosting setup, that is. I would have to assume that this has been done many times before, but it's always fun to have an idea pan out the way that you expected it to! -Andrew