[Ref: disklabel(8), fdisk(8), FAQ 14 - Disk Setup]
Partitioning is the process where you divide up your Hard Disk into logical segments (partitions) for storing files. A good approach is to not pre-optimise how your partition should look. This is to say, no single configuration will work for you in every possible system installation.
Be prepared to build a few test systems to gauge the relative sizes your disk usage and requirements (if not already known.) Set your standard as something that will change as your needs and understanding grows.
For a 1st time installer, just building a test environment. The installer will give you two practical options:
Try those out and monitor how your disk space is used.
Use du and df to gather information about your actual usage pattern for a better understanding, determination of your partition needs.
du -h /partition
or
df -h
The question on the size of your swap partition is a well worn path, here is a short table of information that you can use as a conversation starter.
The swap partition, usually on slower storage devices (at least much slower than RAM), is used to ‘fake’ available memory. When the system runs out of ‘real’ memory, it will continue to run by using the ‘faked’ memory. When more of this ‘fake’ memory is used, performance degrades as the Operating System has to swap out ‘real’ memory into storage (‘fake’ memory) and swap in ‘fake’ memory for use.
Because ‘swap’ tells your OS kernel to ‘fake’ available memory, the application asking for memory cannot differentiate between ‘faked’ memory and ‘real’ memory. When there’s lots of ‘swap’, applications will happily ask for more and more and more.
Size | Description |
---|---|
More | Fail Slowly. You've run out of memory, 'fake' it. Swap memory to storage and keep running, until both are used up. |
Less | Fail Quickly. You've run out of memory, 'fake' it for a little and when it fills up, stop! |
NONE | Stop! There is no available 'fake' memory, when you run out of real memory, stop! |
Hibernation technologies often use a ‘swap’ facility/space for putting the ‘RAM’ content onto storage media. Confirm the standard for your release/OS to help you decide how much space you need for ‘swap’.
Graphics, Video Editing, Web browsers are classes of applications that use up a lot of memory (and may be slow because of ‘swap’ space being used. ‘More’ swap may be required for you to complete your work, or may be the cause of your application performance slowness.
The following is on simple partitioning scheme, on the premise that data on this configuration will not grow, the only partition expected to grow after installation being the /var/logs partition.
Slice | Mount Point | Capacity | dump;fsck |
---|---|---|---|
a | / | 5G | (default) |
b | (swap) | 2G | ~ |
c | (disk-slice) | (disk) | ~ |
d | /tmp | 4G | (default) |
e | /usr | 10G | (default) |
f | /home | 10G | (default) |
g | /var/log | 20G | (default) |
h | /var | 10G | (default) |
i | /storage | * (available left-over) | 0 0 |
The above works well for us on 50G + Hard Disk Drives, for systems functioning primarily as non-caching proxies and firewalls.