From owner-freebsd-questions@FreeBSD.ORG Fri Dec 5 13:12:34 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FCA2335 for ; Fri, 5 Dec 2014 13:12:34 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B30A6A83 for ; Fri, 5 Dec 2014 13:12:33 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id r20so1340196wiv.8 for ; Fri, 05 Dec 2014 05:12:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=55wA4y0oUB1ECodhKqltfN7kyFc+HkCUIguP5e6a/eM=; b=BBC2mpKQ9qXxu1iZ2oK9Uu4e0Y7KYNj7EVDSLRdwbNNnwzFohFMREpVNIbKVA0hmer o+aGsO05EtekZ7oAVdzuNIs4QlSIOjImcJe3c3yo1+2v+uUu4ENQ06xf5Z6ZzZMdEMmZ S/dEWTaiu1uL0eYxgdpqvtqXzTg14CPkpCeIHMxvraBChdUKQk4AuDCoGH/q8bpC5Ytm ++64yP6Lw+Mj0tZHdAruRCc4Q/cTbKc8n6jYc84O7vq+0eGDQj6mJ7DtzrpAmk1TqVD5 /KkiVRZGCBZZWyCw/+JQyI4HvcSQAyjiySg2QVyn7vVOmBKgiZZ86skzNmujsPvTni9n YCiw== X-Received: by 10.180.107.198 with SMTP id he6mr4191797wib.44.1417785150970; Fri, 05 Dec 2014 05:12:30 -0800 (PST) Received: from gumby.homeunix.com (bcdc819a.skybroadband.com. [188.220.129.154]) by mx.google.com with ESMTPSA id ej10sm2265039wib.2.2014.12.05.05.12.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 05:12:30 -0800 (PST) Date: Fri, 5 Dec 2014 13:12:29 +0000 From: RW To: freebsd-questions@freebsd.org Subject: Re: FreeBSD working from RAM (MFSROOT) as a Workstation. Message-ID: <20141205131229.5ebd96d2@gumby.homeunix.com> In-Reply-To: <447fy665uf.fsf@be-well.ilk.org> References: <1417734458.1772.1.camel@zoho.com> <447fy665uf.fsf@be-well.ilk.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 13:12:34 -0000 On Fri, 05 Dec 2014 00:08:56 -0500 Lowell Gilbert wrote: > clutton writes: > > > Is anyone use a FreeBSD as a Desktop working from RAM, using > > MFSROOT? > > That only speeds up the *first* load of each memory page mirroring a > disk sector. After the system has been up a while, it's actually > slower than running with a disk, because everything you actually use > will have two copies in RAM: one on the disk image, and the one > that's actually occupying normal resident pages. I don't know much about MFSROOT, but I doubt that's right. It seems unlikely that the kernel caches ram in ram, the normal expectation is that a single copy of a page is used until it needs to be copied-on-write. > TL;DR: To run from RAM, you first have to load the RAM. The chances > that an MFSROOT does this more efficiently (than starting directly > from the nonvolatile disk) seem remote. It depends on what you care about. If you aren't bothered by the time it takes to boot, on a desktop it may be preferable take a lot of separate reads off the critical path. An alternative might be to do a conventional boot and then kick-off a background script that pre-caches as much of the SSD as will fit in the remaining free memory. I'd try this first because it's a lot less trouble and will give a reasonable indication of how much thing can be speeded-up (at least until the cache is driven-out by something else).