1833758 Members
2548 Online
110063 Solutions
New Discussion

Swapspace configuration

 
Richard Zanni
Occasional Contributor

Swapspace configuration

We are looking at reconfiguring our swapspace on our HPUX 11.0 systems running SAP. SAP requires at least 20GB of swap. Each system has two local root drives (36GB), which are mirrored. Currently we are set up in this manner:
Primary Swap (lvol2) - 8 GB mirrored across both root disks
Secondary Swap (lvswapA) - 8 GB on one local root drive (not mirrored)
Secondary Swap (lvswapB) - 8 GB on other local root drive (not mirrored)

We are considering mirroring all swapspace across both drives.

The reason we are thinking about doing this is that in the past there have been a couple instances where we have lost one of the root drives. Our understanding is that the system was using the swapspace area that was suddenly unavailable, causing it to hang. We would then have to go and reboot it with the good drive. This seems to defeat the purpose of having mirrored root drives for redundancy.

Also, if we mirror swap across both root disks, does it really do any good to divide it up into smaller lvols? Should we just have a primary swap and one huge secondary swap?

- Rich
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Swapspace configuration

Rich,

If you're only going to be placing swap on the two root drives, then it doesn't make any difference whether you split it up or not. Any gain would come from distributing it amongst other spindles, or better yet, not using swap at all!


Pete



Pete
Michael Steele_2
Honored Contributor

Re: Swapspace configuration

Regarding "...We are considering mirroring all swapspace across both drives..."

Mirror you swap.

There is no 'swapoff' command in HP-UX. And if you lose a disk where unmirrored swap resides then the server will panic.

Put your secondary swap on disks other then boot disks. This will minimize I/O.

More physical memory is better then swap and inexpensive so check into upgrades. Upgrades aren't that complicated you just needed the purchase order.

Keep your swap priorities the same, all '1'. This will allow for interleaving between primary and secondary.

Many small lvols on one disk would map out all over the place and be less efficient then two large lvols on two different disks.

Remember to use contiguous.
Support Fatherhood - Stop Family Law
Steven E. Protter
Exalted Contributor

Re: Swapspace configuration

SAP requires 20 GB of swap?

Bet it woudn't run real well on a system with 2 GB of memory then, because your swap ratio will be all messed up.

There is a lot of debate on the issue of swap. I've seen A. Clay post that you should have a small primary swap and a larger secondary. This will get good performance especially when system load is low.

The general rule I've learned is swap should be between 1.5 and 2.0 times physical memory. I've tried running Oracle with a 1 to 1 ratio and paid the performance price.

I generally have one swap area, though I'm setting up a "new" D320 on Mondahy and I'm going to try A. Clay's idea. It has 1 GB of ram, so there will be a 500 MB primary and a 1.5 GB secondary swap.

I'm intimately familiar with this system, so we'll see how things work.

I do mirror my swap on production systems. If a disk goes, the system won't run right without swap.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: Swapspace configuration

You absolutely want to mirror swapspace -- all of it because you will not be able to do online disk replacements otherwise.
If it ain't broke, I can fix that.
Ivajlo Yanakiev
Respected Contributor

Re: Swapspace configuration

HI

Yes idea is good. If you mirror root disk keep all in mirror. HPUX can not swap off space and if you have problem with one disk you will have troble with swap manager.
Problem is that using mirror for swap in not good for two reason.

1. Using swap in your vg00 will slow down your work
2. Mirroring swap is pointless becouse of MONEY.

For me is good to keep primary swap = RAM
and to have additional disk only for swap.
if you can, choice fastes disk.

Remember that you need mirror as well because of swap nature



Are you real use this big amount of swap ?

Use swapinfo to catch your real needs ?
A. Clay Stephenson
Acclaimed Contributor

Re: Swapspace configuration

It's been my experience that SAP only needs this swap during installation; it actually checks but once that's done you don't need it at all - even for patches. The point is that if you are swapping, you ain't performing. I routinely run systems with huga amounts of memory and 512MB of mirrored primary swap, pseudoswap enabled, and that's it.

One way to "outbushwhack" this without having to set aside huge amounts of disk that will never be used (and 2X when mirrored) is to configure the awful, terrible, filesystem swap at very low priority. If you have enough memory, you aren't using it anyway.

The optimal method is to configure with a small amount of primary swap, set swapmem_on=1, and then monitor swap usage. It's so easy to add after the fact that worrying about swapspace layout on the front-end is a waste of time.
If it ain't broke, I can fix that.