How big should /var/tmp be?

I plan on installing a couple of programs using source code: FireFox, AbiWord, Xfce, etc.
How big should I make my /var/tmp? I'd also like to download the source code for the FreeBSD kernel. Does FreeBSD install source into /var/tmp?
 
/var/tmp is used as temporary place for an unpacked packages, before being installed.
A good idea is to delete that directory
rm -rf /var/tmp
and create a softlink to /tmp instead of this
ln -s /tmp /var/tmp
And better is to move /tmp into SWAPSACE
by editing /etc/rc.conf
Code:
tmpmfs="YES"
tmpmfs_flags="-m 0 -o async,noatime -S -p 1777"
tmpsize="768m"
Now I have allocated 768 Mb of SWAP area for temporary storage.
That will do for any heavy compile or large package install.
 
Programs that are built from ports use a work dir which resides inside its port directory, so /usr/ports/
The downloaded *.tar.gz's are placed in /usr/ports/distfiles/.

FreeBSD sources are installed to /usr/src/

N.B. One can set WRKDIRPREFIX=</path/to/dir> in /etc/make.conf if you wish to build ports elsewhere, ie NFS ro mounts as an example.
 
JoshuaBranson said:
How big should I make my /var/tmp?
[snip]
Does FreeBSD install source into /var/tmp?
FreeBSD kernel source code goes in /usr/src/sys.
Ports (distfiles plus build directories) go in /usr/ports.
Packages unpack in /var/tmp but normally get removed afterwards.
The only other thing I can think of right now that uses /var/tmp is editors/vim, for its recovery files.

I don't usually make /var/tmp a seperate filesystem because my /var is large enough already. You could also remove /var/tmp and (re)symlink it to /tmp if you like - and if /tmp is large enough of course.

Because /var/tmp is mostly used for package unpacking, I'd say that 500 MB ought to be enough, you can probably even do with less. Having said that, I wouldn't make /var/tmp a seperate partition in the first place.

I do tend to make seperate partitions for /usr/src though. The FreeBSD kernel source code is around 150-200 MB [Edit: actually, that's all source, not just the kernel - my bad, sorry] but you'll also need space for the actual build (object files and stuff), so I'd say reserve at least 500 MB for that.

Hope this helps,

Fonz
 
Back
Top