/ almost out of space just after installation

RW rwmaillists at googlemail.com
Sat Oct 10 22:00:28 UTC 2009

On Sat, 10 Oct 2009 11:27:31 -0600
Chad Perrin <perrin at apotheon.com> wrote:

> On Fri, Oct 09, 2009 at 10:15:22PM +0100, RW wrote:
> > On Fri, 9 Oct 2009 17:28:09 +0200 (CEST)
> > Oliver Fromme <olli at lurza.secnetix.de> wrote:

> > > Depending on the size of installed RAM, /tmp could also
> > > be a memory disk by default. 
> > 
> > I don't see why it should depend on the amount of RAM, since it
> > would normally be swap-backed.
> It should depend on the amount of RAM because putting /tmp in memory
> takes away from the RAM available to the rest of the system.  If your
> system typically runs processes that consume a lot of RAM (like
> Firefox, ha ha), your system could bog down a lot during typical use
> if you use a RAM disk for /tmp without considering how much RAM you
> have and need to use.  By default, I think, /tmp should be on the
> hard drive -- perhaps with an option when partitioning to set it up
> to use RAM instead of physical storage.

But it's not really a true RAM disk unless you use specify a malloc
backed md device - which you should never do because it keeps the /tmp
data in RAM unconditionally. 

tmpfs and swap-backed md devices normally used for /tmp are similar to
conventional partitions in that they are disk-based storage cached in
RAM. The difference is that because swap is ephemeral there's no need
to commit updates to the backing store except for memory management

Most people's  /tmp requirements are pretty modest compared to
modern swap and RAM sizes, but my /tmp device is ~3 times RAM size and
it doesn't seem to create problems when I fill it. 

More information about the freebsd-questions mailing list