Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jun 2013 07:25:55 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        freebsd-fs@FreeBSD.org
Subject:   Re: /tmp: change default to mdmfs and/or tmpfs?
Message-ID:  <alpine.BSF.2.00.1306090711250.70087@wonkity.com>
In-Reply-To: <alpine.BSF.2.00.1306091538490.48048@woozle.rinet.ru>
References:  <alpine.BSF.2.00.1306091538490.48048@woozle.rinet.ru>

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

> Dear colleagues,
>
> 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"
>
> Given more and more fixes/improvements committed to tmpfs, switching /tmp to it
> would be even better idea.
>
> You thoughts?  Thank you!

tmpfs has been working fine here for /tmp.  I also use it for /usr/obj. 
It does not tie up a fixed chunk of RAM, and can grow to large sizes if 
necessary.  And maximum size can be limited in fstab.  (Possible 
improvement: allow human-readable sizes instead of just blocks.)

One problem is that tmpfs is cleared by a reboot.  This would surprise 
users expecting the default behavior (clear_tmp_enable="NO"), and would 
require some prominent warnings in the release notes and maybe in the 
installer.  Or in the startup scripts: "/tmp on tmpfs, contents will be 
discarded on reboot".



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