cancel
Showing results for 
Search instead for 
Did you mean: 

Swap limit

Swap limit

Is there a limit to the amount of swap space you can configur on the system?
7 REPLIES
Stuart Browne
Honored Contributor

Re: Swap limit

It does depend on the kernel version and the arch you're using.

But let's take a RedHat document (ES4):

https://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/x8664-multi-install-guide/s1-diskpartitioning.html#S2-DISKPARTRECOMMEND

32 x 2GB = 64GB.
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: Swap limit

.. That being said, I've got x86 systems with 4GB swap partitions, and have no trouble with them .. but I guess it's scale-of-magnatude ..

RHEL5 appears to have a multi-TB swap limit.. so, fun.. ;)
One long-haired git at your service...
palaniappan.sp
Regular Advisor

Re: Swap limit

Hi all,
In Red Hat Enterprise Linux 2.1 there was a limitation on the partition size of 2GB for each swap space. This was due to the mkswap command not supporting creation of a swap partition larger than 2GB. If the system requires more than 2GB of swap space, work around this limitation by creating multiple swap partitions.
RHEL3 and above, the mkswap command allows the creation of a swap partition of a larger size than 2GB.RHEL 2.1 supports upto 32 swap partitions, each can be a maximum size of 2GB. Maximum total swap size is 64GB.
RHEL3 and higher supports larger swap partitions, each can be of maximum size set by the file size limit and the block device limit for swap partitions on that platform. Red Hat Enterprise Linux 3 has a 1TB limitation as maximum size of block devices, so it's 1TB.
While larger swap partitions are permitted, one large swap partition could affect system performance. For better performance it is recommended to split swap space to multiple discs. Separating swap partitions to different disk could reduce the load on a single disk.

Let me know if any details req...

Regds,
palani.
Everything is Possible and Anything is Feasible if u try
Andrew Cowan
Honored Contributor

Re: Swap limit

You should really think very clearly before allocating a very large amount of swap since this can affect the performance of your machine, as the kernel has to continually scan and maintain these spaces.

A good strategy is to have even sized swap's on each disk, and try where possible to put them on the drives with the least IO. This not only improves performance, but can also increase system resilliance.
Ivan Ferreira
Honored Contributor

Re: Swap limit

The red hat official documentation for swap size limit is here:

http://www.redhat.com/magazine/017mar06/departments/tips_tricks/
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Stuart Browne
Honored Contributor

Re: Swap limit

Hehe! I like the closing sentance of that magazine entry:

"Red Hat is working to update this information in the installation guide."

No wonder it's hard to get a straight answer out of their documentation :)
One long-haired git at your service...

Re: Swap limit

Thanks Folk !!!!!!!!!