1835251 Members
2320 Online
110078 Solutions
New Discussion

Swap, dump and LVM

 
Martyn Foster
Occasional Contributor

Swap, dump and LVM

Hi,

My customer had 4 x internal 9Gb disks on his server and he had primary swap on 1 disk and swap/dump on another disk (2 LV's across 2 VG's) mirrored.
Now he is using 2 x internal 36Gb disks and using 8Gb of swap/dump on 1 LV (mirrored).
Is having 8Gb on 1 disk (mirrored) ok or are there issues about a crash dump being overwritten by system swap.
If anyone can offer a good solution to having swap all on 1 disk and 1 LV that would be great.

Thanks,

Martyn
Tough times don't last, tough people do!
6 REPLIES 6
Rita C Workman
Honored Contributor

Re: Swap, dump and LVM

Well, first I would have to say that the goal is to avoid swapping out to disk in the first place. So if you have the kernel properly tuned (and enough memory) than you should not be swapping out to disk at all. There are a number of threads on this you can search and review.

That said....if you are/must set up disk for disk swapping then let me simply say that you would not want all of your processes to swap to 1 disk. It is better to spread your swap across multiple disks to give better performance. Putting all your demand on one disk would greatly increase your I/O and hinder performance.
And as soon as I finished setting up multiple disks for swapping - my next job would be to write a request for more memory.

Rgrds,
Rit
harry d brown jr
Honored Contributor

Re: Swap, dump and LVM

Martyn,

How much memory do they have now, and how much swap are they actually using?
Live Free or Die
Bill McNAMARA_1
Honored Contributor

Re: Swap, dump and LVM

swap should not overwrite dump
unless /etc/rc.config.d/crashconf says never to transfer the dump to disk. Typically /var/adm/crash/

man crashconf (and use the command) to verify that lvol2 is sufficient in size.

Before swap is activated on the reboot, the dump will be copied if the /etc/rc.config.d/savecrash says so.

You still may get something from your /etc/shutdownlog or syslog.log


Later,
Bill
It works for me (tm)
A. Clay Stephenson
Acclaimed Contributor

Re: Swap, dump and LVM

Hi:

My real preference is to swap so little that it doesn't really matter how swap is laid out.
There is a problem with mirroring swap and dump. You want to mirror swap but if dump is mirrored, there is a 0.5 probability of the dump being written to either disk. My preference (if I've bought enough memory and I always do), is to configure a small primary swap (256MB-512MB) that is mirrored and a seperate dump area that is not. If I think I need more swap (or as a safety net) I then configure the terrible, dreaded, and bad filesystem swap at very low priority. Why waste disk that is not going to be used as mirrored device swap?

If you do choose to use device swap, make sure that you do not configure two areas on the same drive with equal priority, you will drive the head positioning mechanism nuts.

Clay
If it ain't broke, I can fix that.
Bill McNAMARA_1
Honored Contributor

Re: Swap, dump and LVM

you can change your dump destination via kernel param:


SAM > Kernel > Configurable>
Check dontdump = 0

SAM > Kernel > Dump Devices >
specify different lvol for dump if necessary...

(man savecrash too)
It works for me (tm)
Roger Baptiste
Honored Contributor

Re: Swap, dump and LVM

Martyn,

It's ok to have one 8Gb
lv for swap/dump. But,
there are a few things which
needs consideration:

Swap -> it is always better to
spread your device swap on
different disks/LV's. So,
instead of having one huge
8Gb swap volume, you can split
into 4LV's of 2Gb each.
If you have external disks,
you can create a swap space
from them too. By spreading
swap, you get better performance.

Dump -> If you are using
Hpux 11.00, you can find
out what the Dump size of your
system needs to be by
using the crashconf -v command. Based on this
you can configure one LV
with that size and it can
also used for swap.
Also, remember to set the
dump file in the /etc/rc.config.d/crashconf
file.
here is a whitepaper which
gives you useful details on
Dump:
http://docs.hp.com/hpux/onlinedocs/os/syscrash.html

For 10.20 , your dump
would be the RAM+kernel
and an additional 25% of the
value.

You can check your
current configuration
by lvlnboot -v

HTH
raj
Take it easy.