Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I have a rel 5.6 system that we just added more memory to.
1. What is the correct or best way to increase swap?
2. Can I remove the swap space later on?
3. How do you remove it when done?
Our rootvg only has 8G available to it and I want to be sure if i allocate anything out to it I can reclaim when done without having to rebuild the system.
We have to do a lot of data moves so we allocated extra memory to this VM system and now we need to increase swap.
I did see several articles in google but they describe using a new swap partition, a swap file and increasing an existing swap space.
I am still not sure what is the best way to go knowing this is a temp situation.
vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 2943080 213748 510840 0 0 5 108 211 133 0 0 99 0
rootvg:
Alloc PE / Size 733 / 22.91 GB
Free PE / Size 287 / 8.97 GB
cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/rootvg-LogVol01 partition 4095992 0 -1
RAM is cheap enough and plentiful enough these days that swap-space is much less important. I think that you should have some, but the old saws that it should be some n% of RAM have begun to lose their former meaning.
I see nothing to persuade me that you have a legitimate cause for concern here.
well the system is idle now we have not started the data move. thats why you dont see any high usage on it. I want to increase the swap before they do it.
Create swap {partition,file} as you see fit. mkswap on it as per your googled articles. Use swapon to activate the new space.
Do your work, use swapoff to deactivate the added swap. Then delete the extents.
Where A is the block size and B is the number of times you will write that size. The size of the image is AxB.
'mkswap' will format that file adequately.
Finally, you can add the swap using swapon, and remove it using swapoff. You can also put it in fstab just like a regular swap partition, and you can add as many swap files as you wish. Read the man pages for dd, swapon and swapoff, they might be helpful.
You already have 4GB of swap. If you really need more than 4GB of swap you should think about the dimensioning of the machine. If it uses that much swap I would assume that you don't have dimensioned that machine according to its workload. It will be really slow. You should add more RAM.
Look at the different ways posted above for a swap file and a swap partition. It may suite you to make a swap file. They may be a bit easier to play with.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.