How much swap space for Fedora?

The answer has evolved over time

Quoting, paraphrasing…

Circa Fedora 25

Recommended swap space
System RAM No hibernation Allowing for hibernation
less than 2 GB 2 times the amount of RAM 3 times the amount of RAM
2 GB – 8 GB Equal to the amount of RAM 2 times the amount of RAM
8 GB – 64 GB 0.5 times the amount of RAM 1.5 times the amount of RAM
more than 64 GB workload dependent hibernation not recommended

At the border between each range listed above (for example, a system with 2 GB, 8 GB, or 64 GB of system RAM), discretion can be exercised with regard to chosen swap space and hibernation support. If the system resources allow for it, increasing the swap space may lead to better performance.

Via Installation, GUI Manual Partitioning Recommendation, In Installation Guide, Fedora 25

Circa Fedora 16

M = Amount of RAM in GB, and
S = Amount of swap in GB, then

If M < 2
    S = M *2
    S = M + 2
System RAM Recommended Amount of Swap Space
4GB of RAM or less a minimum of 2GB of swap space
4GB to 16GB of RAM a minimum of 4GB of swap space
16GB to 64GB of RAM minimum of 8GB of swap space
64GB to 256GB of RAM a minimum of 16GB of swap space
256GB to 512GB of RAM a minimum of 32GB of swap space

One can obtain better performance by distributing swap space over multiple storage devices, particularly on systems with fast drives, controllers, and interfaces.

Via Disk Partition Recommendation for x86, In Installation Guide, Fedora 16.

Circa Fedora 14

There is a rule for swap space that is some think as follows:

  • For machines up to 4 gigs of ram, it is 1.5 times the amount of ram.
  • For machines above, it is the larger of 6 gigs or the amount of ram in your system. stopping at 8 gigs.

Since you may want to also use hybernate or suspend, add 2 gigs to the above.

[There is] doubt that one would ever use even 8 gigs for swap.
16 gigs is extremely generous (waste of diskspace).
One can also use two swap files of 4 gigs each.

Via Swap Space, In Storage Administration Guide, Fedora 14.

Comments are closed.