Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Aug 2000 10:05:21 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        "Allen Pulsifer" <pulsifer@mediaone.net>
Cc:        <freebsd-hackers@FreeBSD.ORG>
Subject:   re: what to do about /tmp
Message-ID:  <200008151705.KAA29836@earth.backplane.com>
References:   <NBBBJNDFEKPEHPFCLNLHCEFBHNAA.pulsifer@mediaone.net>

next in thread | previous in thread | raw e-mail | index | archive | help
:basically obsolete.  As I understood it, the regular file system has
:sophisticated caching built in and effectively acts like a memory file
:..
:
:I noticed Matt Dillon wrote a handbook section on the VM system at
:http://www.freeBSD.org/handbook/internals-vm.html that includes
:some info on tuning, but it doesn't mention what to do with /tmp.
:
:So what's the bottom line?  Should I leave /tmp on the root file
:system, create a dedicated partition for /tmp, or mount the
:swap partition on /tmp using the MFS?
:
:Thanks,
:
:Allen

    What I do is make /tmp a softlink to /var/tmp, and make /var/tmp its
    own partition.

    I turn softupdates on on all my partitions, including root (you can do
    that now)

    I do NOT use MFS or MD for /tmp, nor do I leave it on /.  I keep it as
    a separate partition and combine it with /var/tmp because both /tmp
    and /var/tmp tend to be used interchangeably anyway, and /tmp 
    (or /var/tmp) is the most likely of all your partitions to get filled
    up accidently and you don't want that interfering with other things if
    it happens.  Many things use /tmp, so you can wind up with megabytes in
    it which makes it unsuitable for use with MD and inefficient when used
    with MFS.

    Typically I configure my paritions as follows:

	/		128MB
	swap		(2x main memory, 128MB minimum)
	/var		128MB (minimum, more if using machine for mail/printing)
	/var/tmp	128MB (minimum, more if using machine multiuser)
	/usr		2G
	/home		remainder of disk

	/tmp softlink to /var/tmp
	/compat softlink to /usr/compat

    Even though '/' per say only needs 64MB, having 128MB there is useful.
    I've seen 64MB / partitions 'fill up' with softupdates turned on when
    doing an installworld (because softupdates doesn't delete the files
    being replaced fast enough), and I tend to keep debug kernels sitting
    around in / as well.

    I make /usr big (2G) in order to accomodate ports, since /usr/local
    is part of /usr.

    The ordering of the partitions is also carefully arranged.  The lower
    sector numbers are the 'faster' sectors on a disk, closer to the outer
    rim of the disk where transfer rates are much faster.  So I put swap 
    there along with the smaller partitions, and put /usr and /home later
    since those partitions are big enough that you really don't get a
    uniform performance benefit anyway.

						-Matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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