Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 09:35:52 +0100
From:      "Frank Leonhardt (m)" <frank2@fjl.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Md based tmpfs with zfs root system.
Message-ID:  <F04EB42D-7D1D-4D13-87A4-18FAA39BB0F7@fjl.co.uk>
In-Reply-To: <20171018211136.2f143b1a@gumby.homeunix.com>
References:  <20171018164559.GA3267@anza.vindaloo.com> <20171018211136.2f143b1a@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 18 October 2017 21:11:36 BST, RW via freebsd-questions <freebsd-questions@freebsd.org> wrote:
>On Wed, 18 Oct 2017 12:45:59 -0400
>Christopher Sean Hilton wrote:
>
>> Good day,
>> 
>> I've using a new system with root on zfs. I've traditionally used a
>> /dev/md* based tmpfs for /tmp. A little initial reading on the
>subject
>> shows an argument about this practice but I didn't find any threads
>> that provide a resolution. 
>
>
>md devices and tmpfs are two different things. tmpfs is a bit like an
>md device, but it has its own built-in file-system, so it only uses
>memory for current files, whereas an md device stores all the sectors
>that have ever been written to, even if they hold deleted files.
>
>I don't follow ZFS much, but unless there is a specific reason not to
>use tmpfs with zfs it's preferred over md devices.
>
>If the issue is the use of swap with zfs, neither tmpfs nor
>swap-backed md devices actually require swap.  

My thought on reading the original question was to wonder what the ZFS ARC does with MDs. Does it result in double caching in RAM, or does something clever happen? I suspect the former.

Using tempfs will probably take a bigger hit in low RAM situations (as it pages), but if you are short of RAM you'd be optimising the wrong thing with a RAM disk anyway.

Does anyone remember if there is a POSIX requirement for /tmp to be nonvolatile?

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F04EB42D-7D1D-4D13-87A4-18FAA39BB0F7>