Date: Tue, 8 Oct 2002 08:54:51 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Christopher Smith <csmith@its.uq.edu.au> Cc: questions@FreeBSD.ORG Subject: Re: Use MFS for /tmp, etc ? Message-ID: <20021008075451.GA10638@happy-idiot-talk.infracaninophi> In-Reply-To: <B9C881F1.30CDD%csmith@its.uq.edu.au> References: <B9C881F1.30CDD%csmith@its.uq.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 08, 2002 at 12:37:05PM +1000, Christopher Smith wrote: > What's the consensus for using an MFS filesystem for places like /tmp. > /var/tmp, /var/run, etc ? I see in some oldish postings to -questions this > is considered a bad idea, does this still apply in more recent versions of > FreeBSD (4.6.2) ? Using mfs for /tmp works very well. I wouldn't use it for /var/tmp or /var/run though -- files in /var/tmp are meant to persist across reboots. /var/run is far too small to bother mounting as a separate partition, and having it as a mfs won't give you any apreciable perfomance advantage. If you do use mfs on your /tmp partition, there are a few gotchas: i) *Always* use the '-s nnnnnn' mount option to limit how much memory the mfs will use up. Otherwise, there's a very easy denial of service attack that can use up all your memory+swap The argument to -s is given in sectors: that's multiples of 512 bytes by default. ii) Don't mount /tmp noexec and expect to be able to do a 'make buildworld' or to be able to build a number of ports. The 'nosuid', 'nodev' and 'nosymfollow' options are useful security enhancements though. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021008075451.GA10638>