Operating System - HP-UX
1822100 Members
3691 Online
109640 Solutions
New Discussion юеВ

Creating seperate swap on multiple disks in VG

 
SOLVED
Go to solution
Michael Boul
Occasional Advisor

Creating seperate swap on multiple disks in VG

My server has 2 enclosures, both with 4 drives. I am using one disk as an OS disk, and have 3 other disks to use for swap, etc.
I have 80GB of swap on the OS disk, but need a total of 320 GB. I want to spread 80GB (each) across the other 3 disks.
I need to opinions on the best way to do this. I would prefer 4 x 80GB swap (with the same priority), can I create a VG01 and specify multiple 80GB swap lvol, one created on each specific device in the VG?
I was planning on using some of the remaining space in the VG to create an lvol for /var/adm/crash.
mike
10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: Creating seperate swap on multiple disks in VG

>>but need a total of 320 GB

Why in the world do you need 320 GB of swap? How much RAM do you have? Do you have swapmem_on enabled so you can use pseudo-swap?

Michael Boul
Occasional Advisor

Re: Creating seperate swap on multiple disks in VG

The server has 160GB of memory. My customer has asked for swap to equal double memory. What is the benefit of pseudo-swap, and what resources does it use? I'm open to all suggestions.
mike
James R. Ferguson
Acclaimed Contributor
Solution

Re: Creating seperate swap on multiple disks in VG

Hi Michael:

> What is the benefit of pseudo-swap, and what resources does it use? I'm open to all suggestions.

Pseudoswap is enabled by setting the kernel 'swapmem_on' to a value of one.

This is an accounting trick that tells the kernel to count 75% of physical memory as part of device swap. Since all processes must be able to reserve swap space at their instantiation, whether or not they actually ever use swap space, enabling pseudoswap prevents you from having to dedicate physical disk for swap space. Pseudoswap is designed for systems with large amounts of physical memory.

I would definitely enable pseudoswap in your environment.

Regards!

...JRF...
Doug O'Leary
Honored Contributor

Re: Creating seperate swap on multiple disks in VG

Hey;

In the vast majority of situations, I would agree with James Furgeson's note above. The one caveat to that is if the system is going to be used for Integrity Virtual Machines. In that case, psuedo swap is turned off and memory should at least equal ram.

Curious timing: I was asked this exact question the other day. Barring all other considerations, my rule of thumb for swap space is:

swap=ram for ram <= 8 gigs.

After 8 gigs, I'll use 8 gigs of swap unless there's a reason to bump that. Reasons could include being a database server, SAP, *lots* and lots of memory intensive programs running, etc.

Obviously we don't know your system; however, on the face of it, 320 gigs of swap is a ridiculous waste of disk space.

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Patrick Wallek
Honored Contributor

Re: Creating seperate swap on multiple disks in VG

>>Doug said:
>>memory should at least equal ram.

Last I checked, memory did equal ram, unless you are talking virtual memory. ;)

I think you mean "swap should at least equal ram?"
Don Morris_1
Honored Contributor

Re: Creating seperate swap on multiple disks in VG

Doug - just a note on Integrity VM and pseudo-swap.

Obviously, this doesn't apply to 11.31 being used as the IVM Host (IVM v4.0 on 11i v3). If for no other reason, you can not disable pseudo swap on v3 anyway. More to the point, there were some changes in the software patches IVM Host on v3 requires to address why prior releases disabled it.
Andres_13
Respected Contributor

Re: Creating seperate swap on multiple disks in VG

"Obviously we don't know your system; however, on the face of it, 320 gigs of swap is a ridiculous waste of disk space."

Good one. I├В┬┤d agree with that.

Regards!
Michael Boul
Occasional Advisor

Re: Creating seperate swap on multiple disks in VG

>Obviously we don't know your system; however, on the face of it, 320 gigs of swap is a ridiculous waste of disk space.

The hardware is an Integrity Superdome, 6 cells for nPar0, 2 cells for nPar1. The system with the 160GB of RAM will be on nPar0 and will be an Oracle database server. nPar1 will be made up of vPars, all Oracle database servers, ranging from 8 to 80GB of RAM.
I am looking for assistance with nPar0, and the 160GB of RAM vs swap.
mike
Michael Boul
Occasional Advisor

Re: Creating seperate swap on multiple disks in VG

All nPars and vPars are running HPUX 11i v2
mike
VK2COT
Honored Contributor

Re: Creating seperate swap on multiple disks in VG

Hello,

Your setup worries me. It looks like
your boot disk is not mirrored at the moment
(you only mention one primary disk for swap,
whilst you plan to use other three disks
for secondary device-based swaps).

If I understand your environment correctly,
than the first priority is to set up
RAID-1 for the boot disk (in other words,
two out of four disks would be used
for the O/S and the primary swap device
would be mirrored).

Since you have a large hardware environment,
is it possible to add SAN to the
nPar0? If so, than you problem is
easily solvable with a simple, portable,
efficient, and safe method:

a) Set up primary swap of, say, only 8 GB
on two boot disks).

b) Use SAN LUNs to add additional
device swaps with the same size of 8 GB
and define the same priority.

That way, swap areas are "interleaved".

Why is this method nice:

a) If you ever add more RAM, you can
easily expand your swaps by adding
additional LUNs (so that your 2 x RAM,
or similar, rule always apply);

b) You are not wasting large amount of space
for primary swap on the boot disks;

c) If you ever start swapping, you
will not "abuse" your boot disk with lot
of swap activity. Primary swap of 8 GB
is certainly easier to handle than 80 GB
one;

d) You also need to think about crash dumps.
Having large amount of RAM also means you need a large amount of space for it (in
the worst case scenario, same size as
RAM or so). If you set up device swaps on
SAN, than you could set up primary
swap NOT TO BE DUMP area! In other words,
set up separate space for crash dumps
(could be any of the two unused disks in
the enclosure, and the good thing is that
dump is NOT MIRRORED).

In addition, you would then disable savecrash
at boot. You can imagine the horror of
saving crash dumps at boot time for
a server with massive amount of RAM.

When I design the servers, my priority is robustness and speed of recovery. Your SLA
would kill you if you had savecrash enabled
automatically. Imagine saying to the
customers and managers "well, just wait
for the reboot, we are saving a crash dump
and it will take several hours"...

When I teach Unix/Lnux, one of the
basic lessons I give is:

Anybody can put a DVD into the drive and
build a default Unix server. The server will
probably work under average conditions. The
questions is: will it survive under
difficult conditions (hint: of course not).

Plan well and you will live not to regret it.

Good luck and cheers,

VK2COT
VK2COT - Dusan Baljevic