FreeBSD Setup: Ideal Partitioning Scheme
February 21, 2007
FreeBSD may not require a lot of resources, but it seems to under-estimate itself when it comes to automatic partitioning. For most servers, you’re much better off choosing your own partitioning scheme than letting the installer do it for you.
- swap - I've always used 2.5x the physical RAM in the machine, although I've heard 2x and 1.5x as well. In any case, it's not something I'd worry too much about unless you need to fine-tune a server's performance.
- / (root) - The default (512MB) should be fine.
- /var - For most configurations, the default is way too small. You need to allocate space based on what you intend to do with your server; if you're planning on running a web or mail server, you would probably want to give /var most of your disk space. Even if you're not going to keep much data in /var I would still give it a couple gigs, just to make sure you don't have any trouble with log files filling up all your free space.
- /tmp - You'll want to allocate extra space here as well, since install scripts may fail if they need to unpack large files. I've heard 2GB is a good value.
- /usr - Your user accounts live here, along with custom programs you install (including the ports collection). It's entirely up to you how much space you want to allocate; I would give it around 4GB if you don't plan on storing user data on the server.