Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2013 17:16:23 +0400 (MSK)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        Jeremy Chadwick <jdc@koitsu.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: /tmp: change default to mdmfs and/or tmpfs?
Message-ID:  <alpine.BSF.2.00.1306091709350.48048@woozle.rinet.ru>
In-Reply-To: <20130609124603.GA35681@icarus.home.lan>
References:  <alpine.BSF.2.00.1306091538490.48048@woozle.rinet.ru> <20130609124603.GA35681@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 9 Jun 2013, Jeremy Chadwick wrote:

> > what do you think about stop using precious disk or even SSD resources for 
> > /tmp?
> > 
> > For last several (well, maybe over 10?) years I constantly use md (swap-backed) 
> > for /tmp, usually 128M in size, which is enough for most of our server needs.  
> > Some require more, but none more than 512M.  Regarding the options, we use
> > tmpmfs_flags="-S -n -o async -b 4096 -f 512"
> 
> Hold up.  Let's start with what you just gave.  Everything I'm talking
> about below is for stable/9 by the way:

Don't mix md-backed tmp with tmpfs, see below:

> 1. grep -r tmpfs /etc returns nothing, so I don't know where this magic
> comes from,

it is /etc/rc.d/tmp with tmpmfs_* rc variables actually

> 2. tmpfs(5) documents none of these flags, and the flags you've given
> cannot be mdconfig(8) flags because:
> 
> a) -S requires a sector size (you specified none),
> b) -n would have no bearing given the context,
> c) -o async applies only to vnode-backed models (default is malloc,
>    and I see no -t vnode),
> d) There is no -b flag,
> e) The -f flag is for -t vnode only, and refers to a filename for the
>    vnode-backing store.

all these are related to mdmfs(8)

> So consider me very, very confused with what you've given.  Maybe the
> flags were different on FreeBSD 6.x or 7.x or 8.x?  I haven't checked
> http://www.freebsd.org/cgi/man.cgi yet.

Actually, there are two different questions (or kind of questions):
- are we considering switching off /tmp from real media-backed storage?
- is so, what are we selecting: memory/swap-backed UFS (mdmfs) or tmpfs?

> As I understand it, there are (or were -- because I remember seeing them
> repeatedly brought up on the mailing lists) problems with tmpfs.
> Sometimes these issues would turn out to be with other filesystems (such
> as unionfs), but other times not so much.
> 
> If my memory serves me correct, there are major complexities with
> VM/memory management when intermixing tmpfs + ZFS + UFS on a system***.

Yes, hence my question about status of tmpfs now.

And yes, I personally do *not* used tmpfs-backed /tmp on real productionj 
servers -- just mdmfs-backed.

OTOH, I *do* use tmpfs for my builder (for tinderbox for now, but I'm planning 
switch buildworld/buildkernel there too), with little issues yet.

[snip the rest, I have to dig a bit more to answer]

-- 
Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck@FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



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