Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Oct 2009 23:00:18 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: / almost out of space just after installation
Message-ID:  <20091010230018.435dc8f2@gumby.homeunix.com>
In-Reply-To: <20091010172731.GB4669@guilt.hydra>
References:  <e277d6c80910082339m229ecd6bqfbadd12a6fb7f116@mail.gmail.com> <200910091528.n99FS90I025341@lurza.secnetix.de> <20091009221522.2fbcd123@gumby.homeunix.com> <20091010172731.GB4669@guilt.hydra>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 10 Oct 2009 11:27:31 -0600
Chad Perrin <perrin@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@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
reasons.

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. 




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