From owner-freebsd-emulation Tue Feb 26 17:28:39 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from goose.prod.itd.earthlink.net (goose.mail.pas.earthlink.net [207.217.120.18]) by hub.freebsd.org (Postfix) with ESMTP id 81CAE37B402; Tue, 26 Feb 2002 17:28:31 -0800 (PST) Received: from pool0352.cvx40-bradley.dialup.earthlink.net ([216.244.43.97] helo=mindspring.com) by goose.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16fstR-0001s4-00; Tue, 26 Feb 2002 17:28:30 -0800 Message-ID: <3C7C362F.422C79CF@mindspring.com> Date: Tue, 26 Feb 2002 17:28:15 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Patrick Thomas Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: Four misc. questions related to jail usage References: <20020226154918.D34815-100000@utility.clubscholarship.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Patrick Thomas wrote: > 1. Does each jail need to have its own proc filesystem mounted? It depends on how you plan to use it. If you use no programs that need procfs, then you don't need it. > The > original jail documentation says to do that, but I have heard rumors that > this is not necessary. What is the negative ramifications (if any) to > running a jail without its own seperately mounted proc filesystem ? (I > have a test machine with ten jails on it, and I have ten extra proc > filesystems mounted - I would like to avoid this if possible..) Programs will fail to provide information normally obtained from procfs (e.g. "ps" works this way), or will simply fail entirely. For -current, you're also going to need to mount a devfs in there, too, minimally for /dev/null and /dev/zero. > 2. Does kern.maxproc scale in a linear fashion with maxusers ? It's linear, but that doesn't mean it's correct for your application. The most common tuning mistake is bumping up maxusers in order to get something else bumped up as a side effect. > 3. is kern.maxvnodes determined automatically based on other settings, or > do I ever have to tune this myself by hand ? Depends on the version of FreeBSD, as to whether it's "automatic", since that could mean many things (e.g. Matt's autoscaling patches based on physical RAM size); you never _have_ to tune _anything_ by hand... but it's often a good idea to do so. The kern.maxvnodes is, as Matt explained yesterday, self-limiting. > 4. Why is it that some linux utilities, run inside a jail, get the > hostname of the host machine, and not the hostname of the jail itself ? I > am successfully running linux apps in jails by using linux compat on the > host system and running linux.ko, but sometimes these linux apps get the > wrong hostnames.... Dunno. Probably it's using linprocfs or something to get the information, and the code is not adjusting the return based on the caller being in a jail. Ask PHK; he started the whole "jail" thing. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message