Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The swap partition serves the same purpose as a page file. It is a fixed size (created by you), but you can expand it or reduce it using various methods. Normally, you shouldn't need to do that.
Explain more about your situation if you need specific help.
On one hand there is the swap partition but on the other hand, is there any pagination file for the virtual memory under RHEL 4.6 ?
If you choose, you can use a swap file instead of or in addition to a swap partition.
Quote:
Like under Windows, there is a swap file growing in the course of using applications.
Having the swap file grow on demand is one of the bad features of Windows and one of the reasons Linux memory management is more efficient and more reliable.
A swap file that grows automatically as it is used is significantly more complicated than one whose size is fixed. It is a feature that could be done well by an expert OS programmer, but in Windows it was not done well and so far as I understand, in Linux it was not done at all.
In Linux, you need to decide on the amount of swap space.
"swapon -s" will show the currently in-use swap extents.
Redhat have (or had) some documents on their site to walk you through adding/reducing swap space. Several scenarios need to be catered for.
As for dynamically adding, merely (always) activating extras is sufficient - kswapd will by default fill each in turn as needed unless told otherwise.
I made a research in Redhat documentation with the elements you gave me and I found that there are different ways to modify swapping.
1. Create a new swap partition
2. Create a new swap file
3. Extend swap on an existing LVM2 logical volume
RH recommends the option 3. But to do it you must have a LVM logical volume or need to create one. I think it's probably the best option but not the more easy to do.
For those who are interested, this is the procedure for the creation of a swap file :
There is no point installing LVM just for swap - if you have a vg with space, use that. Else just create partitions/files in your current setup. Despite what you might read on the net, there is no adverse effect in using swap files rather than swap partitions with 2.6 kernels.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.