Bug 113458

Summary: swap guidlines misleading...
Product: Red Hat Enterprise Linux 3 Reporter: Johnray Fuller <jrfuller>
Component: rhel-sagAssignee: Sandra Moore <smoore>
Status: CLOSED NEXTRELEASE QA Contact: John Ha <jha>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: adstrong, andriusb
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/sysadmin-guide/ch-swapspace.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-29 19:12:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123819    

Description Johnray Fuller 2004-01-14 04:46:36 UTC
The guidelines for swap are a little misleading...

"Chapter 2. Swap Space
2.1. What is Swap Space?...

...The size of your swap space should be equal to twice your
computer's RAM, or 32 MB, whichever amount is larger, but no more than
2048 MB (or 2 GB)."

Creation of the proper amount of swap space varies depending on a
number of factors including the following (in descending order of
importance):

- The applications running on the machine.
- The amount of physical RAM is installed on the machine.
- The version of the OS.

In general the following rule of thumb works well:

> Swap should equal 2x physical RAM for up to 2 GB of physical RAM and 1x
> RAM above that, but never less than 32 MB.

Using this basic formula, a system with 2 GB of physical RAM would
have 4 GB of swap, while one with 3 GB of physical RAM would have 5 GB
of swap

For systems with really large amounts of RAM (more than 32 GB) you can
likely get away with less (around 1x, or maybe less, of physical RAM).

Unfortunately, allocating swap is more of an art than a science, so
hard rules are not really possible.

One other note, both RHEL 3 and RHEL 2.1 support up to 32 swap files.
However, due to limitations in the mkswap application under RHEL 2.1,
the maximum size of those partitions or files can be no larger than 2
GB. The version of mkswap which ships with RHEL 3 does not have this
restriction.

Hope that helps!

Johnray

Comment 1 Tammy Fox 2004-01-14 04:49:55 UTC
Assigning to new owner

Comment 2 Suzanne Hillman 2004-01-15 20:00:28 UTC
*** Bug 113459 has been marked as a duplicate of this bug. ***

Comment 3 Milan Kerslager 2004-06-11 15:30:57 UTC
See this links for more info about SWAP:

http://www.kerneltraffic.org/kernel-traffic/kt20030616_219.html#15

Comment 4 Andrius Benokraitis 2005-03-29 19:12:00 UTC
Thanks for all the comments and advice! :-)

Chapter updated, committed to CVS. Expect changes to go live for Update 1 for RHEL4.