Operating System - HP-UX
1854702 Members
13606 Online
104102 Solutions
New Discussion

Re: HP-UX 11.0 primary swap

 
SOLVED
Go to solution
Geetha Alagappan
Regular Advisor

HP-UX 11.0 primary swap

I just installed HP-UX 11.0 64-bit on a K570 box with 4G of memory. I think I may have gone a little overboard on the primary swap. I created a 4200M primary swap area on VG00. I don't mind losing the space. I have two 8.9G disks in VG00 (and another 2 for mirroring).

Is there any kind of limitation on the size of primary swap eg: 4G on HP-UX 11.0 running on K570? On second thoughts, I should have allocated a smaller primary swap and added secondary swap of the same prioririty.

Will I run into problems if I leave it as is (I would prefer that :) ) I don't want to re-ignite the box.

Thanks in advance.

Geetha.
hercules
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor
Solution

Re: HP-UX 11.0 primary swap

Hi Geetha:

There is nothing wrong with a 4GB primary swap on vg00 with 4GB physical memory. If you need to add additional swap space, add it on a device *other than* vg00 and set the device's swap priority to zero (0). Since primary swap has a priority of one (1) secondary swap would then be preferentially utilized, thereby reducing (if in fact you do swap!) I/O to vg00.

Ideally, you will really never use swap. It must be there in reserve, however, during process birth.

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: HP-UX 11.0 primary swap

1) Maximum swap size, if my brain cells work right is 16 GB in 11.00

2) There are two schools of thought at least on swap allocation.

The first says twice physical memory, end of story. But when you get into the high end on memory that might not be so true.

I'm a A. Clay guy myself now.

I set the primary swap small, priority zero at exactly half physical memory. Thats the minimum you need for a dump.

Then I have, on a second disk, a larger priority one swap area, between 1.0 and 1.5 times physical memory, depending on the applications the box is running, how many database instances and such.

My machines generally during light to medium load only use the small faster swap area, and they run pretty snappy.

The performance degradation is not so bad when the secondary starts to be used, but it doesn't get used much around here.

swapinfo -tam

Mine shows on a 4 G machine

rp5450 L2000

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
dev 6144 0 6144 0% 0 - 1 /dev/vg00/lvol3
reserve - 755 -755
memory 3253 355 2898 11%
total 11445 1110 10335 10% - 0 -


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
Pete Randall
Outstanding Contributor

Re: HP-UX 11.0 primary swap

Geetha,

You're right that the preferred method would be to spread out your swap I/O by putting a secondary swap volume of equal priority on another device. In fact you can still do that. You'll end up with 8GB of swap space but that's not a bad thing. With only 4GB of memory, I would imagine you may well use swap with some regularity.

You might want to look into another 4GB (or more) of RAM and if you do increase RAM, you'll want to increase swap to at least 1X RAM, anyway.


Pete


Pete
A. Clay Stephenson
Acclaimed Contributor

Re: HP-UX 11.0 primary swap

As long as you don't mind losing the space (and it's 2X when you mirror) then there's nothing wrong. You may hear so stuff about how it's better to have many swap spaces and interleave the swapping between them --- but when you start swapping to any significant degree performance is so degraded that worrying about swap layout is all but a waste of time.

Having said all this, the better method is to actually configure with only a small amount of primary swap (512MB or so -- mirrored), enable pseudo-swap and then monitor the usage. It's so easy to add swap later that it's wasteful to blow a bunch of disk as primary swap when chances are it will never actually be used.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: HP-UX 11.0 primary swap

Hi Geetha,

Although that's probably more swap than you'll need, I don't see it as a problem.
If you have 18 GB (mirrored) for vg00 then you still have 13GB+ available for all the other LVs - which is more than enough.
I wouldn't re-Ignite unless you have another reason to.
No, there is no limit - only disk space & kernel parms limit ultimate swap size.
And no you won't run into problems - in fact you now have a dump space large enough to get a complete dump if you ever need one.
I wouldn't lose any sleep over this.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: HP-UX 11.0 primary swap

As long as you don't mind losing the space (and it's 2X when you mirror) then there's nothing wrong. You may hear some stuff about how it's better to have many swap spaces and interleave the swapping between them --- but when you start swapping to any significant degree performance is so degraded that worrying about swap layout is all but a waste of time.

Having said all this, the better method is to actually configure with only a small amount of primary swap (512MB or so -- mirrored), enable pseudo-swap and then monitor the usage. It's so easy to add swap later that it's wasteful to blow a bunch of disk as primary swap when chances are it will never actually be used.
If it ain't broke, I can fix that.
Massimo Bianchi
Honored Contributor

Re: HP-UX 11.0 primary swap

Hi,
your configuration is O.K.

The only limitation in swap comes from kernel parameters,
maxswapchunks
swchunk
nswapdev

Massimo


Geetha Alagappan
Regular Advisor

Re: HP-UX 11.0 primary swap

Thanks to all of you (James, Steve, Pete, Clay and Jeff) for your prompt responses. I won't worry about this now and in the other boxes that I am going to cold-install will definitely go for your recommendation.

You guys are the best. These forums have saved my life very often!
hercules