From owner-freebsd-questions@FreeBSD.ORG Sun May 14 14:01:26 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 AE07B16A404 for ; Sun, 14 May 2006 14:01:26 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B04043D48 for ; Sun, 14 May 2006 14:01:25 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from localhost (monrovll-cuda1-24-53-251-44.pittpa.adelphia.net [24.53.251.44]) (AUTH: LOGIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sun, 14 May 2006 10:01:24 -0400 id 00056410.44673835.0000C76A Date: Sun, 14 May 2006 10:01:21 -0400 From: Bill Moran To: Andrew Message-Id: <20060514100121.60fce840.wmoran@collaborativefusion.com> In-Reply-To: <1147578337.10075.12.camel@LatitudeFC5.network> References: <1147578337.10075.12.camel@LatitudeFC5.network> Organization: Collaborative Fusion X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 14:01:26 -0000 Andrew wrote: > Ok, I'm a bit fuzzy on some of the details, so take it easy. ;-) > > 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? > > 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? Keep in mind that if you set up jails the cononical way, each jail instance will have it's own installation of Apache. Even if each of these installations are _identical_, they're still seperate, and the kernel has now way of knowing that /jail1/usr/bin/httpd and /jail2/usr/bin/httpd are the same execution image (Unless you're doing symlinks or hardlinks). So getting that kind of memory sharing will require some extra work on your part, above and beyond what is normally done for a jail. -- Bill Moran That's why I never kiss 'em on the mouth. Jayne Cobb