- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Increasing SWAP
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2005 11:45 PM
06-13-2005 11:45 PM
I have upgraded my L class server running 11i with 2Gb for a total of 5Gb.
I thought would be good idea to increase the swap too. I tried to make my homework, I read a lot of the posts regarding this and I remember doing it in the past to allocate 1Gb creating lvol2.
Well, the server used to have:
/dev/vg00/lvol2 Device 1 1022 of 1024 now/on boot
/dev/vg00/lvolswap Device 1 2046 of 2048 now/on boot
And I tried to increased lvolswap from 2Gb to 4Gb increasing just the logical volume, which I thought was possible as I thought was not the primary one, but unfortunately it is. Now this is how it looks like (lvdisplay -k -v):
LV Name /dev/vg00/lvolswap
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4000
Current LE 1000
Allocated PE 1000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t0d0 1000 1000
But this did not increased the swap in the system… The question here is how to fixed it? I think I need to create a new lv for swap but also I want to recover those 2Gb, what do I need to do?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 12:05 AM
06-14-2005 12:05 AM
Re: Increasing SWAP
Did you reboot after?
I suppose it may only be you will have to generate a new kernel with appropriate value for maxswapchunks
lets say 6000 will give plenty of freedom...
By the look of it you may well finish up with 5GB swap...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 04:02 AM
06-14-2005 04:02 AM
Re: Increasing SWAP
I have not rebooted the system yet as I have almost 10 Oracle instances running and it is a bit of a job for the dba to start them up/shut them down, besides is a new chap.
I am getting a bit worried as my maxswapchunks is just 1536. How do you calculate the size?
Also I have found in other post that the primary can be increased ONLY if you have free space contigous to the existing swap. Well, how do you know is contigous? and How do you increase it? The only thing I know is that they were in the same volume group vg00 and that there was free space there...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 04:24 AM
06-14-2005 04:24 AM
Re: Increasing SWAP
to see if it is strict/contiguous:
Example:
lvdisplay /dev/vg00/lvol2 |grep Allocation
Allocation strict/contiguous
If you need more swap, I just create a new one...
Example - adding a 10 GB swap:
lvcreate -L 10240 -n lvswap /dev/vg00
swapon -f /dev/vg00/lvswap
then add to /etc/fstab:
/dev/vg00/lvswap ... swap pri=1 0 0
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 05:10 AM
06-14-2005 05:10 AM
Re: Increasing SWAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 05:20 AM
06-14-2005 05:20 AM
Re: Increasing SWAP
$ swapon -f /dev/vg00/lvolswap
swapon: /dev/vg00/lvolswap is already enabled for paging.
but if I do the swapinfo:
$ swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 23 1001 2% 0 - 1 /dev/vg00/lvol2
dev 2048 23 2025 1% 0 - 1 /dev/vg00/lvolswap
reserve - 1339 -1339
memory 3883 3047 836 78%
total 6955 4432 2523 64% - 0 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 05:39 AM
06-14-2005 05:39 AM
Re: Increasing SWAP
If you have the default values of swchunk and DEV_BSIZE with maxswapchunks of 1536 it should give you about 3.2 GB of swap since setting this parameter is only going to cost you a reboot, fix it high enough for future needs af swap so 5000 should bring you to about 10GB...
swapon will only work if you are adding a new swap device...
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 05:51 AM
06-14-2005 05:51 AM
Re: Increasing SWAP
The current value (1536) means 3 GB. This is the current upper limit for your kernel.
The formula may be simplified as:
maxswapchunks >= size_in_MB / 2
note: that 2 means 2 MB (the default size of a chunk set by the default value of swchunk kernel parameter).
I suggest to double the current value in order to let the kernel to handle up to 6 GB of swap. So, next time you'll need to add more swap (up to 6GB), you will not need to reboot again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 10:35 PM
06-14-2005 10:35 PM
Re: Increasing SWAP
I am going to increase the maxswapchunks as you suggested it.
What still puzzles me is if after the reboot I will have the extra 2Gb that I need. Checking if it is continous:
$ lvdisplay /dev/vg00/lvolswap|grep Allocation
Allocation strict
It comes just with strict and it seems it has to be "Allocation strict/contiguous".
Lets clarify something, increasing the space of the logical volume lvolswap was wrong, now I need to rectify it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 12:32 AM
06-15-2005 12:32 AM
Re: Increasing SWAP
If you really want swap guarantied there is nothing stopping you to create yet another swap space this time of the correct size then use swapon but since you dont have the right value of maxswapchunks it can be only used at next reboot the idea here is then you can try to not use the other swap at next reboot and after remove it and so you recuperate your 1000PE again.
Now you havent said how the rest is configured because to make the swap the most efficient, you should have different swap on different disks (Pv etc) accessed by different controllers but of SAME SIZE...
So it is for performance better to have 3 swaps of 2 GB than one of 1GB and the other of 4...
All the best
Victor
Dreaming of a pint of BRAINS
(Is it exported?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 04:55 AM
06-15-2005 04:55 AM
Re: Increasing SWAP
The plan was to have:
/dev/vg00/lvol2 of 1Gb (primary)
/dev/vg00/lvolswap of 4Gb
But if the recommendation is to have the same size, well I am stuffed. I think I just can go for 1,2,2... and the last one would be in a different disk.
The primary swap (lvol2) looks like:
$ lvdisplay -k -v /dev/vg00/lvol2
--- Logical volumes ---
LV Name /dev/vg00/lvol2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default
So it is in the same vg and in the same Pv...
Sorry I still haven't got idea of how I am gonna get back those 2Gb. Let me see if I got it right:
1- I will reboot the server
2- Somehow I will remove the 2Gb.
3- Change the maxswapchunks to 3000
4- Create the 2Gg of swap in another disk using swapon.
5- Reboot again.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 05:52 AM
06-15-2005 05:52 AM
Solutionstart by modifying using SAM the value of maxswapchunks
make it 4000 like that you have some spare and it may save you a reboot in the future...
Once rebooted, go to "disk and file system"/swap, create 2 swaps of 2GB in different VGs, and remove the 4GB one and since vg00/lvol2 is now smaller, change its priority in favor of the 2 new ones..
Now you shall reboot again
And all should be fine
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 06:39 AM
06-17-2005 06:39 AM