Let's make it clean and simple. I've 4GB of RAM and 500GB of HD. What's the recommended size for swap,root,/boot,/var,/opt,/home,/usr and other mount points.
NOTE: Size in percentage would be helpful to others with different configuration.
42 Answers
seriously, why do you need this kind of separation for each mount point. if its your personal computer,then there's actually no need to do this. Linux file system is too cool with that. you can just separate your / partition,swap area and /home partition and if there's requirement then the /boot. and this is totally fine. no need to have so many separate partitions.
There's no hard and fast rule for this, just rules of thumb. Like a lot of others have said, it is truly based on what you will do with this system. There are also a lot of filesystem options. For the most part, stick with ext4.
Note: Dropbox on Linux now requires ext4. I believe that no longer allows encrypted home directories, either.
Here's some of the other options:
ZFS - Originally developed for Solaris, later ported to BSD and Linux. This is typically used in servers with RAID setups, like FreeNAS (FreeBSD-based). Has advanced file system features, de-duplication (very RAM heavy) and copy-on-write (CoW). There were some licensing issues that were recently ironed out. Not currently recommended (2018).
JFS - Originally developed for IBM's AIX, and later ported to Linux. It was a journaling file system before ext4 entered wide use. According to RedHat, it has not seen active development for a decade, and they plan to remove the modules for it at some point in the very near future.
XFS - Originally developed for SGI's IRIX, later ported to Linux. At one time, Fedora installs recommended it. While better for large media files, it has some downsides in that it cannot shrink, nor does it gracefully handle power outages.
ReiserFS - A series of file system by Hans Reiser. It is now abandoned. Don't use, although it did handle small files efficiently.
vFat or FAT32 - 2GB file limitation, 2TB partition limit (limited to 32GB in Windows), although larger partition sizes will suffer from wasted slack space when used with many small files.
NTFS or ntfs-3g - Windows NTFS. Good for cross-platform file transfer. Some overhead is incurred by writing to NTFS volumes.
FFS - BSD Fast File System (ReadOnly). Hopefully you will not run across one of these. Available purely for compatibility purposes. If you do run into this, it can be in 'dangerously dedicated mode', i.e. no disklabel. FFS handles partitioning (slices) internally. [note: that dangerously dedicated mode has been discouraged since at least 1999]. I believe most *BSD systems have transitioned over to ZFS, and can boot from it now (as of FBSD 8). FFS/UFS support is deprecated has been removed from modern kernels.
swap
In the really early Linux days, it was recommended that swap be 2x system memory. But in those days, the system memory was 4 to 8MB. Now, you can easily set it to 50% to 175% of system memory. You'll want more than system memory if you hibernate. Some users - especially those with single SSD drives forgo swap entirely to lengthen the life of the SSD.
boot
For historical reasons, a separate boot partition was created to get around the first BIOS limitations - first a 128MiB limit, then a 512MiB limit, then a 2048MiB (2GiB) limit, and so on. If you are setting up Linux on obsolete hardware, you'll want to keep this in mind. Also, obsolete Linux will typically require ext3 instead of ext4. Additionally, if your OS drive will be encrypted, then you'll require a separate boot partition. Otherwise, no.
opt or app
The home of externally installed software. Only use this if a vendor requires it. FWIW, Lately, I've been seeing a lot of vendors symlink opt to app (and vice-versa)
var
In the old days, for performance reasons, you'd want this mounted with a ReiserFS filesystem (small text file efficient) with noatime set so that logging functions would not have to bother with updating the access time after every single log file write. I recommend sticking with ext4 over ReiserFS now, and the noatime speed boost is negligible compared to the additional complexity of maintaining yet another filesystem. If you absolutely insist - 5GiB to 10GiB. You'll need enough to download the debs/rpms/ypkg that you'll need to upgrade the system. Contents of /var are very important, as you'll usually have the package database here. Lose that, and you will spend a great deal of time recovering from it. Also your logs and your print spool is here, and possibly database information and website, so bump the above number accordingly.
tmp
I would not split this out anymore. 512MiB to 2GiB tops.
usr
Personally I find no benefit to splitting this out anymore. If you really want to, and your OS takes up about about 10 to 15GiB, you'll probably want at least 30 to 35GiB of space in case you need to do a system upgrade.
root
I would go no smaller than 10GiB if you split everything else out. If you don't, just add those other sizes back into the previously mentioned 10GiB minimum.
home
Just give it all that is left.
disklabel
One last thing to mention is the disklabel. If the disk is in a machine with BIOS, you must use the MS-DOS disklabel, complete with the 4 partition limit (extended partitions help with this), and one of the requirements is that /boot or / exist as a primary partition has been marked as bootable. You can also use a MSDOS disklabel if you have EFI with CSM modules enabled.
Otherwise, you should use GPT with an EFI enabled bootloader.
I'm not so knowledgeable on bootloaders and disklabels, so feel free to correct me.
TL;DRNot giving percentages because the sizes of OS requirements don't typically change that much from generation to generation.
swap - 0% to 200% of system memory.
/boot - if needed, 2.5GiB or less.
/opt - only if explicitly needed. Size as req'd
/app - same as opt
/var - only if needed, 5 to 10GiB
/tmp - put it on root, otherwise 512MiB to 2.5GiB
/usr - put it on root, otherwise 35 to 40GiB
/ - (root) 10GiB min (if other parts used), otherwise 65GiB
/home - Whatever is left
----- What I use on my non-work computers -----
/ - 65GiB
swap - no more than 100% of system memory
/home - Whatever is left