Operating System - HP-UX
1847660 Members
4478 Online
110265 Solutions
New Discussion

how to make primary swap 64GB

 
KCS_1
Respected Contributor

how to make primary swap 64GB

Hi,

I know the limitation of maximum size of swap as following limitation value=swchunk*maxswapchunk*1024

I would like to make primary swap 64GB during installation procedure,that's not likely secondary.

any comments appriciate.

thanks

How to make it
Easy going at all.
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: how to make primary swap 64GB

Why in the world would you want Pri. Swap at 64GB? That really is way too much. Your pri swap really should be 3-4GB at the MOST. Everything else really should be secondary swap.

lawrenzo
Trusted Contributor

Re: how to make primary swap 64GB

I have read the below link and used the advise in the past;

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=147792
hello
A. Clay Stephenson
Acclaimed Contributor

Re: how to make primary swap 64GB

Well, this is really, really dumb. First, because very few boxes need that much swap. The old rules about needing 2-3x memory as swap almost never apply. Secondly, there is no need for it to be primary swap. You are probably making it that big for dump space but swap and dump really should have nothing to do with each other. Swap is so easy to add, it makes much more sense to configure a small primary swap area; enable pseudoswap; and monitor the system. You can add additional swap if needed and there is no performance penalty for secondary swap. If anything, it's better than all primary swap.


You need to increase maxswapchunk to 64k and set swchunk to 4096; that will get you a 64GB total swap space.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: how to make primary swap 64GB

Do not make primary swap larger than 2-4Gb. Most large systems will never use swap in prouction (other than for memory-mapped files). I have heard that SAP and a few other giant ERP packages need MASSIVE amounts of RAM (20-50 Gb) during installation but never use more than a few Gb when running normally. And I am sure you will hit some fundamental HP-UX mapping issues when the primary swap space is so large. NOTE: You can only change the size of the primary swap area by completely reinstalling, either from CD/DVD or from an Ignite/UX backup.

If this is one of those packages (and I really question a design that needs dozens of Gb just to install...), just add a few secondary swap areas temporarily using the swapon command. As long as the maxswapchunk value is large enough, just add what is needed. Once the install is finished, reboot and the temporary swap areas are gone.

NOTE: if there is a reluctance to use secondary swap areas due to performance, this is an old sysadmin adage that was obsolete more than a dozen years ago when disks were really slow (1-5 MB/sec transfers). Today's disks are huge in size and most large scale systems use disk arrays or SANs which mitigate most all performance concerns about multiple swap areas.


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: how to make primary swap 64GB

You don't.

You make smaller swap areas and prioritize them.

If you want them to add up to 64 GB Guzunter Hait (Yiddish, tough day), because you will never use that much.

You are wasting disk space.

With that much memory I find it difficult to believe you will ever swap. But you need some space for dump.

Set up as Bill Says (always a idea listening to him), set up 4 GB as priority zero.

Then I suggest running the system and seeing if you actually use any. If you can't wait, set up another 4 GB as priority 1. Keep adding them until you are nice and comfy.

The priority assignment will assure you that you won't have too much swap open at one time. Keep lowering the priority(increasing the priority) number as you add swap areas.

Please do stop after adding 1 or two and see how your system runs.

I kind of wish I got to have the kind of hardware you're working with.

Good Luck, happy to clarify further
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
KCS_1
Respected Contributor

Re: how to make primary swap 64GB

At first,thanks for all advices.

Yes, all are good advices that understandable, however, one of my customer wants to make it for overloads or something to get the results by their software on the machine under the swap space, I tried to understand them what is the best on the way as well. Even tough, 64GB swap space doesn't need, we don't care at all.
HOW TO MAKE iT if it's possible

Easy going at all.
Bill Hassell
Honored Contributor

Re: how to make primary swap 64GB

As mentioned, you can't change the primary swap area size without a complete re-installation. But you can add all the swap space you want using swapon. Just find an appropriate logical volume and use swapon to add it. Edit fstab to make it permanent.


Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor

Re: how to make primary swap 64GB

If you want to do it:

1) Verify that you have a disk large enough for this task. A 144 GB would be good so that you still have room enough for the rest of VG00 after your 64 GB of pri swap.

2) Boot the system from an HP-UX CD or an Ignite tape and go through an Advanced Installation.

3) Modify the LV size for Pri Swap and set it to the size you require.

4) Attempt to install.

Don't be surprised if it chokes.

Note that there is NO real supported way to do this without reinstalling the system.

This is STILL a VERY BAD IDEA!!!!!!!!!!!!
Emil Velez
Honored Contributor

Re: how to make primary swap 64GB


You mention dump space in the initial message also. If you execute a crashconf -v you will see how much space a crash will take. As you can see even a system with 64 GB of memory will have a crash fit in a relatively small amount of swap space.

Enrico P.
Honored Contributor

Re: how to make primary swap 64GB

Hi,
I know there is a limit in the primary swap size for the 11i S.O. This limit is 32Gb, so if you setting the swap area > 32Gb at the installation time you will see 32Gb AVAIL with the swapinfo command.

Enrico
TwoProc
Honored Contributor

Re: how to make primary swap 64GB

Let me guess - someone at some-large -and-unnamed-database-provider is giving you a hard time b/c they want to see 1.5 times (or some other magic number) the amount of ram you have actually in swap. If you don't follow up - you can't talk any further to the support team - AND, they simply won't believe what you say HP's best practices are; even if you SHOW them what psuedo-swap is for...
(Boy, did I let out some steam on that one)...

Well, guess what - the max swap you can have on 11.11 is 32G anyways... so tell the support person from the aforementioned db provider that you're dealing with... "Nyeah".

(Gee, I think I had more fun with this response than I was supposed to...)
We are the people our parents warned us about --Jimmy Buffett