Operating System - HP-UX
1752801 Members
5754 Online
108789 Solutions
New Discussion юеВ

Why Not Put All Your Swap Into LVOL2 / Primary Swap

 
SOLVED
Go to solution
Michael Steele_2
Honored Contributor

Re: Why Not Put All Your Swap Into LVOL2 / Primary Swap

Patrick and all:

First of all I'm very happy that you were all online today - I wanted to hear from you all.

Patrick, especiall, and others:

I'm looking for a replacement swap formula similar to the 11.11 maxswapchunks formula. Substitutes suggest adding up all memory consumed by all processes running on the box. (* obviously this would have to be collected before the install and historicl *).

Would not the forula be Glance Memory report, and us total consumed to determine swap size?
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: Why Not Put All Your Swap Into LVOL2 / Primary Swap

I'll start a new thread with this second question since an answer from the community is - yes, put it all on lvol2 if you can.
Support Fatherhood - Stop Family Law
VK2COT
Honored Contributor

Re: Why Not Put All Your Swap Into LVOL2 / Primary Swap

Hello,

Sorry for a belated contribution.
I was teaching Network Node Manager 8i
at a remote site last week and this week
I am teaching HP-UX 11.31 in the hospital
(they are migrating from OpenVMS to HP-UX).

Anyway, there is an old saying that
"a friend in need is a friend indeed".

If you put one large swap device on the
boot disk(s), here are the issues:

a) If you start swapping (for WHATEVER REASON),
your disk performance would be terrible.

b) Remeber, primary swap space is SHARED
with dump by default. So, if a large RAM
server is crashing, you will take certain
time to dump pages into dump/swap area.
And on the way to reboot, HP-UX is,
by default, designed to save crash into
/var/adm/crash (again, that is a default
place). So, you are WASTING significant
amount of boot time after the crash because
silly dump export needs to finish.

c) Due to contiguous block allocation,
primary swap cannot be easily extended.
Yes, I know all the tricks or
possible methods that include even DRD, but that is still an extra work.

So, why do the old things when this works
nicely, even in the dark times when
swap is needed:

a) Small swap device on boot disk(s), say
4-8 GB.

b) Create dump space(s) and ensure it/they
are not shared with primary swap!!!!!

c) Disable savecrash at boot time (hint,
check /etc/rc.config.savecrash file).

d) Add secondary swap devices on SAN.
Most certainly, do not add them on the same PVs. If possible, make them the same size
as primary swap (4-8 GB).

How many you need? I would not really jump
to formula 1x or 2xRAM. That is a silly old
method.

e) Monitor your performance and if you need more RAM, that is what you should deal with.

In the worst case, if the budget is tight,
simply add more secondary swaps on the SAN.

f) Ensure that secondary swaps have lower
priority that the primary swap. For example, all secondary swaps might have priority 0 and
primary swap might have priority 1...

That way, if you really start swapping, your
boot disk will never be abused.

g) If you really have a crash, you will
save close to 50% in reboot time.

Once you recover, you can run savecrash
manually (calmly and patiently).

Remember, we are not building or designing
servers for good times but also for unplanned
bad times. I try to build servers with idea
that they might work long after I am gone. So, plan carefully and regrets can be
avoided :)

Cheers,

VK2COT
VK2COT - Dusan Baljevic
VK2COT
Honored Contributor

Re: Why Not Put All Your Swap Into LVOL2 / Primary Swap

I know the thread is closed, but I thought it
was worth saying what I had to say.

ITRC points are not the primary concern or goal
in my life...

VK2COT
VK2COT - Dusan Baljevic