Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2014 13:12:29 +0000
From:      RW <rwmaillists@googlemail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 05 Dec 2014 00:08:56 -0500
Lowell Gilbert wrote:

> clutton <clutton@zoho.com> 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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141205131229.5ebd96d2>