- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- swap space issue...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО04-10-2007 09:56 PM
тАО04-10-2007 09:56 PM
i have hp rx4640 server with 11i v2 8gb ram and 16 gb swap space..
my
swapinfo -tam gives :->
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16000 2791 13209 17% 0 - 1 /dev/vg00/lvol2
reserve - 9432 -9432
total 16000 12223 3777 76% - 0 -
whereas my /etc/fstab gives ;
# cat /etc/fstab
# System /etc/fstab file. Static information about the file systems
# See fstab(4) and sam(1M) for further details on configuring devices.
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand vxfs tranflush 0 1
/dev/vg00/lvol4 /backup vxfs delaylog 0 2
/dev/vg00/lvol5 /oracle vxfs delaylog 0 2
/dev/vg00/lvol6 /savecrash vxfs delaylog 0 2
/dev/vg00/lvol7 /home vxfs delaylog 0 2
/dev/vg00/lvol8 /opt vxfs delaylog 0 2
/dev/vg00/lvol9 /tmp vxfs delaylog 0 2
/dev/vg00/lvol10 /usr vxfs delaylog 0 2
/dev/vg00/lvol11 /var vxfs delaylog 0 2
# FNS Devolepment Mount points
#/dev/vg_bancs_dev/lvol1 /fns/q1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol2 /oradata_q1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol3 /fns/d1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol4 /oradata_d1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol5 /fns/g1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol6 /oradata_g1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol7 /fns/t1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol8 /oradata_t1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol9 /comlink vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol10 /oradata_fone vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol11 /fns/a1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol12 /fns/r1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol13 /oradata_a1 vxfs delaylog 0 2
#/dev/vg_bancs_dev/lvol14 /oradata_r1 vxfs delaylog 0 2
##################### DO NOT MODIFY FOR CLUSTER PURPOSE ONLY ###################################
/dev/vg_mcgb_prod_fone/lvol1 /oradata_pfone vxfs delaylog 0 2
/dev/vg_mcgb_prod_fone/lvol2 /comlink vxfs delaylog 0 2
################################################################################################
my questn is since swap entry is not there in /etc/fstab then how will i come to know whether swap space is getting used or not ;
b'coz i had rebooted this server on
reboot system boot Tue Mar 6 11:43 - 13:45 (02:02)
now what do i do with that swap space ???
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:01 PM
тАО04-10-2007 10:01 PM
Re: swap space issue...
that is primary swap space...
Anyway for secondary swap space what should be the priority set 0,1,2 and why ,what difference really does it make...?
Can i create a swap space on my storage disk if yes then how ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:06 PM
тАО04-10-2007 10:06 PM
Re: swap space issue...
the first swap lvol by default is /dev/vg00/lvol2, there is non ned to mark it in the fstab (i've never done it).
if you want to add more swap lvol then activate it by the swapinfo(1m) command and add it to the /etc/fstab file like this:
# grep swap /etc/fstab
/dev/vg00/swap_2 ... swap pri=1 0 0
be aware of the priority.
swapinfo -tam gives for me:
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10240 148 10092 1% 0 - 1 /dev/vg00/lvol2
dev 6144 118 6026 2% 0 - 1 /dev/vg00/swap_2
reserve - 16119 -16119
memory 20509 10527 9982 51%
total 36893 26912 9981 73% - 0 -
Regards,
Cedrick Gaillard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:18 PM
тАО04-10-2007 10:18 PM
Re: swap space issue...
thanx for ur response i mean what priority should i set for thats econdary swap space and why?..and also can i set secondary swap space on EVA4k disk...?if yes then how ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:24 PM
тАО04-10-2007 10:24 PM
Re: swap space issue...
/etc/fstab contains filessystem info which r
mountable, since swap is not mounted its entry is
not in /etc/fstab.
Also u can check swap utilisation by command
# swapinfo -tam
u already know this.
Swap is utilised only when paging is required.
Also it is better to set swapmem_on parameter
in kernel to 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 10:44 PM
тАО04-10-2007 10:44 PM
Re: swap space issue...
yes you can add a secondary swap space not only in VG00; take this example :
lvcreate -n lv_swap_1 -C y /dev/vg01
lvextend -l 512 /dev/vg01/lv_swap_1 /dev/dsk/c1t0d0
lvextend -m 1 /dev/vg01/lv_swap_1 /dev/dsk/c2t0d0 (for MIRROR)
Then
swapon -a
(pay attention at maxswapchuncks value).
hth
regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:03 PM
тАО04-10-2007 11:03 PM
Re: swap space issue...
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:09 PM
тАО04-10-2007 11:09 PM
Re: swap space issue...
Actually this setup is for banking domain...
until now we were having only 2 banks,which r now going to increase to might be 5 banks with 20 branches each.hence the transactions would increase as a result of which i need to add secondary swap space now ,temporary arrngmt...and then buy memory of atleast
32 gb then...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:21 PM
тАО04-10-2007 11:21 PM
Re: swap space issue...
I was going through your configuration, I just noticed that you do not have pseudo swap enable, it will do a lot better to your system if you re-enable it.
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:25 PM
тАО04-10-2007 11:25 PM
Re: swap space issue...
im planning to enable it...but i would be needing a reboot for it for which im arranging a downtime...
again my quesn is what swap space priority should i set to my secondary swap space and why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 12:03 AM
тАО04-11-2007 12:03 AM
Re: swap space issue...
First things first: Why do you think you need a secondary swap space? You have a server with 8GB RAM & 16GB swap. IMO you have more than enough swap.
Next thing I'm noticing from the output of 'swapinfo -tam' is that it looks like you do not have pseudo-swap enabled. Normally you should have a 'memory' line in output of swapinfo, which is you pseudo-swap. See the output from one of my servers:
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
reserve - 4020 -4020
memory 8190 5316 2874 65%
total 16382 9336 7046 57% - 0 -
I'm not qualified to recommend that you turn on pseudo-swap, or to explain how it works and why, but I've been told not to ever turn it off. You should seek some professional advice on whether pseudo-swap should be enabled or not. (I'll try to find the article that explains pseudo-swap and post a link)
Finally, the dev line from your swapinfo output shows that you primary swap is 17% used. Normally swap stays unused in HP-UX, and the dev USED % should be 0. So to me that means you are (or have been) paging out. So if anything, your server probably needs more RAM instead of more swap.
I hope the above makes sense.
Now, on to your questions:
Q1) my questn is since swap entry is not there in /etc/fstab then how will i come to know whether swap space is getting used or not
A1) Easiest way to find out if the system knows about your swap space and considers it active is to specify the -a option with swapinfo. If you see it listed, then the system knows about it!
A note on primary swap: it's not in /etc/fstab because the system knows about it at boot time. See the lvlnboot command. Only secondary swap spaces should be listed in /etc/fstab, never primary.
Q2) ...for secondary swap space what should be the priority set 0,1,2 and why, what difference really does it make...?
A2) It doesn't make much of a difference as long as your secondary swap space is "device" swap on the same disk (or mirrored set of disks). If you create a new LV and set it up as secondary swap with the same priority, then in theory you will have "interleaved" swap, and both primary and secondary will get used evenly. Technically you can end up exercising your disk heads a little more if the two swap LVs are physically located in different areas of the disk... So the best thing to do is just to give your secondary swap a priority of 2. That way primary will be used up first, and secondary will be touched only if needed.
Q3) Can i create a swap space on my storage disk if yes then how ???
If you are looking for a procedure, here is a high level one:
1. create a new logical volume, use the '-C y -r n' options with lvcreate (swap must be contiguous and must not have bad block relocation)
2. mirror it to your 2nd OS disk with lvextend
3. add an entry in your /etc/fstab that looks like this:
/dev/vg00/lvnewswap / swap pri=2 0 0
(the / is ignored, it can be any directory)
4. run 'swapon -a'
5. run 'swapinfo -tam' to see your new swap space
That should be it!
Q4) also can i set secondary swap space on EVA4k disk
A4) You can, but I would not recommend it! Too many things can go wrong with an EVA. Worst case scenario is that the EVA will somehow go offline, or you'll lose the Fibre Channel connection to it. Losing your swap space will likely cause an OS panic. The other thing is that at boot time the secondary swap space may need to be activated before the Fibre Channel drives have been loaded. If that's the case, the swap activation will fail.
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 12:08 AM
тАО04-11-2007 12:08 AM
Re: swap space issue...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 12:13 AM
тАО04-11-2007 12:13 AM
Re: swap space issue...
The priority for secondary swap at least for me would be the same priority than primary swap, it would be better in different controller and different disk ( of course ) that we would be having what is called swap interleaving in the event that we need to page out to disk ( you do not want to page out to disk btw, it's a bad thing ).
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 12:27 AM
тАО04-11-2007 12:27 AM
Re: swap space issue...
thank u very much for ur detail explaination..one last questn can i change my secondary swap space priority on fly ..suppose it is 1 now can i change it to 2 now...thanx again......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 01:07 AM
тАО04-11-2007 01:07 AM
Re: swap space issue...
I do not recall swap priority been able to be changed on the fly, the fstab file is the one giving the priority and this file is read everytime the system is rebooted.
Regards,
Jaime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 02:54 AM
тАО04-11-2007 02:54 AM
Re: swap space issue...
Primary swap always gets the priority value of 1. You should never mix swap areas of equal priority on the same physical disk but if you have multiple physical devices that house swap areas then it is a good idea to set them to an equal value. The rule is rather simple; your fastest secondary swap devices should get priority 0 and slower devices get 1, 2, ... but keep in mind that primary swap is always 1.
Now having said all of this, I will add "Big Woo"; it really doesn't matter because worrying about swap layout is very much like rearranging the deck chairs on the Titanic. By the time you get to significant levels of swapping, you have already taken at least a 100x performance hit and all your swap layout tunings might change that to a 99x-101x performance hit and thus "Big Woo".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-12-2007 06:26 PM
тАО04-12-2007 06:26 PM
Re: swap space issue...
I tried this in a couple of different way on a test box, and it appears that you can NOT change anything about a swap space on the fly.
Interestingly enough AIX & Solaris allow you to deactivate a swap space on the fly, and will try to reallocate any swap chunks out of the deactivated swap space. In AIX you can also grow and shrink a swap space on the fly.
Looks like HP-UX *might* be moving in a similar direction because in 11i V3 they've repaced the swapon() sys call with swapctl().