1753511 Members
5479 Online
108795 Solutions
New Discussion юеВ

Swap on VG00

 
MR VILLOT   MR MONTAGNE
Frequent Advisor

Swap on VG00

Hi

I am doing HPUX 11i cold install on K server.
I would like to use 2 disks (2x9 Go mirroring) for vg00 but without swap in vg00. One disk must be used for swap (4Go for 2Go RAM).
The system needs swap to boot (swap in vg00).
Is it possible to not use swap in vg00.
If it is not possible, what is the minimum size of swap to boot.

Thanks
Laurent
8 REPLIES 8
Jeff_Traigle
Honored Contributor

Re: Swap on VG00

I'm not sure if it's possible to have your primary swap in a VG other than vg00. Offhand, I'm not sure why you don't want it there. You can simply include the 4GB drive in vg00 along with the 2 9GB drives you plan to mirror the other LVs on. (Though ideally, I think you really should have a second 4GB drive and mirror the swap LV also... if you lose the swap drive in the configuration you have outlined, your system is toast until you replace the disk.)
--
Jeff Traigle
A. Clay Stephenson
Acclaimed Contributor

Re: Swap on VG00

You must have some (primary) swap in the boot VG but the primary swap can be quite small. Also, if you define secondary swap at priority 0 the primary swap may never be used at all. I typically setup a very small primary swap (256MB to 1GB max) and then add swap as needed. Make sure that you mirror all swap areas so that you don't have to shutdown to replace a disk. You should give some thought to dedicated dump area(s) that are not mirrored. Swap and dump should really have nothing to do with each other.

If it ain't broke, I can fix that.
MR VILLOT   MR MONTAGNE
Frequent Advisor

Re: Swap on VG00

Thanks for your advice.
I don't want to put swap area in vg00 because I want to get same structure for my mirroring disk but i don't know if it is really useful.

I think I am going to put my 4 Go disk in vg00 and I will do mirroring on 9Go and 4Go disks.
When I do new server, I mirror all my logical volumes in vg00 except swap logical volume. I did new logical volume on mirrored disk for swap.
It is the best way ?

If i mirrored swap logical volume, when my system swaps, does it run slowly ?

Laurent
A. Clay Stephenson
Acclaimed Contributor

Re: Swap on VG00

Here's the deal. If your system is paging out (swapping) to any significantr degree, it is running slowly because swapping imposes a huge performance penalty. I like to say worrying about swap layout is like "rearranging the deckchairs on the Titanic". The performance hit is so big from the swap itself that its actual layout is not very significant. The goal of modern UNIX boxes is too not swap at all. I have several boxes with far less swap then memory and they run just fine with pseudoswap enabled. In your case, 2GB is not considered much memory so you would be better advised to increase memory and worry less about swap.
My best advice to your is to configure a small (512MB - which will be 25% of your memory) and enable pseudoswap. Monitor the system and add additional swap as needed. As long as you leave some unused extents in some VG, it's so easy to add additional swap that it is not wsorth worrying about.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: Swap on VG00

You MUST have some amount of primary swap defined in VG00. You could set this down as low as 256MB or 512MB or so.

Dietmar Konermann
Honored Contributor

Re: Swap on VG00

"worrying about swap layout is like rearranging the deckchairs on the Titanic."

lol!

...adding that to my cool phrase collection.

:-)
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Geoff Wild
Honored Contributor

Re: Swap on VG00

Swap must exist on vg00 - and - you should mirror it as well - why? say your primary volume crashes - you will go down hard - because no swap....system will not boot....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Gerhard Roets
Esteemed Contributor

Re: Swap on VG00

Hi Laurent

Not having SWAP in vg00 is not a good idea ... why?. Because this severely decreases the servicibality / recoverability of the machine.

A few senarious.
1. When the machine panicks it can not write its dump file anywhere.
2. If you need to bring the machine up in single user mode you wont have swap and hence will not be able to allocate any memory. My head says pseudoswap wont make a difference in this case since 0 * 0.25 = 0 , this is the formuale for the extra 25% of swap with pseudoswap.
3. If you loose all your discs for some reason you can not ignite your machine back to your original config.

What you can do though. Is set up secondary swap and give it a higher priority. Hece swapping would first go there, while you still have all the current features and you still keep the swapping away from your root vg.

Just a few thoughts
HTH

Regards
Gerhard