Partition Size Planner
Plan partition sizes for root, home, var and swap based on total disk capacity.
About Partition Size Planner
Server and desktop workloads have different storage access patterns, so this planner allocates disk space using different percentage splits for each: servers typically need a larger /var (logs, databases, container images, package caches) relative to /home, since most server systems have few or no interactive user accounts, while desktops need a much larger /home to store user documents, media and application data. A minimum floor size is enforced per partition regardless of the percentage-derived figure, since a tiny /tmp or root partition can cause practical problems even on a small disk.
Formula
Partition size
partition_size = max(minimum_size, total_disk × allocation_percent)
- T
- total disk size
- p
- allocation percentage for the partition
- P_{min}
- minimum floor size for the partition
Worked example
With the default values below, Partition Size Planner returns Recommended Layout of / (root): 100GB, /home: 50GB, /var: 150GB, /tmp: 25GB, swap: 50GB. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Total Disk Sizeminimum 20 GB
- 500 GB
- Use Caseone of Server, Desktop / Workstation
- Server
Results
- Recommended Layout
- / (root): 100GB, /home: 50GB, /var: 150GB, /tmp: 25GB, swap: 50GB
- / (root)
- 100.0 GB
- /home
- 50.0 GB
- /var
- 150.0 GB
- /tmp
- 25.0 GB
- swap
- 50.0 GB
- Remaining / Unallocated
- 125.0 GB
Step by step
- 1Values used
- 2Partition size
- 3Recommended Layout= / (root): 100GB, /home: 50GB, /var: 150GB, /tmp: 25GB, swap: 50GB
- 4/ (root)= 100.0 GB
- 5/home= 50.0 GB
- 6/var= 150.0 GB
- 7/tmp= 25.0 GB
- 8swap= 50.0 GB
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why does a server need a bigger /var than a desktop?
/var holds logs, package manager caches, mail spools, container images and often database data directories — all of which grow continuously on a running server. Desktops generate comparatively little of this data since they run fewer background services and rarely host databases or long-running application logs.
Should I use separate partitions or a single root partition with LVM?
Separate partitions (or LVM logical volumes) for /var, /home and /tmp isolate failure domains — a runaway log file filling /var won't take down the root filesystem needed to boot and run core services — while LVM adds the flexibility to resize volumes later without repartitioning, which is why many production deployments combine both approaches.
Is swap still necessary with modern amounts of RAM?
Some swap is still recommended even on high-memory systems, both as a safety net against unexpected memory spikes and because the kernel can use it to move rarely-accessed pages out of RAM — see the Swap Size Calculator for RAM-based sizing guidance rather than a fixed percentage of total disk.
