FreeBSD working from RAM (MFSROOT) as a Workstation.

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Fri Dec 5 15:34:54 UTC 2014


RW <rwmaillists at googlemail.com> writes:

> On Fri, 05 Dec 2014 00:08:56 -0500
> Lowell Gilbert wrote:
>
>> clutton <clutton at 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.

You're right. The md device creates VM objects directly. 

>> 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.

You're losing some efficiency in how programs get loaded, but once
you're off the "critical path," nobody cares.

> 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).
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list