HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Swap Question

 
SOLVED
Go to solution
CJENSEN_1
Regular Advisor

Swap Question

Guru's,
Well I have another question on sizing swap. We have a new rx3600 running HPUX 11.31, with 24GB of memory. If the desire is to add 24 GB of swap, and the only option is onto vg00 (which is on the internal disk) - which is better: a) make lvol2 24GB, or b) make lvol2 12GB, and create lvol9 with 12GB? In other words - in this configuration, is there any advantage to have one swap lvol vs two swap lvol's? We are igniting the server tomorrow...hence the question.
Thanks...colin
6 REPLIES
James R. Ferguson
Acclaimed Contributor
Solution

Re: Swap Question

Hi Colin:

If you are cold-installing from scratch, size your primary device swap to the extent you want it to be and be done!

If your vg00 is already built, and you need to add additional device swap, *and* have no other volume group to use, add a new logical volume for the secondary swap and set its swap priority to be *different* from that of the primary swap.

While you never want to actually do swap (page) I/O, if you do, you don't want disk head movement as two equal priority swap devices on the same physical volume attempt to interleave the I/O.

Regards!

...JRF...
CJENSEN_1
Regular Advisor

Re: Swap Question


Hi James,
We are re-igniting the server tomorrow from our make_tape_recovery, to test our Disaster Recovery out, and to do this before any applications are on it. Just to confirm we are on the same page here - if our goal is to have 24GB of device swap - I can resize lvol2 during the re-ignite process to 24 GB?
Thanks...colin
James R. Ferguson
Acclaimed Contributor

Re: Swap Question

Hi (again) Colin:

> I can resize lvol2 during the re-ignite process to 24 GB?

Yes. In fact, during an Ignite Advanced Installation (which you select), you have the opportunity to resize any and/or all of the logical volumes that comprise vg00. It's a great opportunity to adjust upwards and/or downwards in size.

Regards!

...JRF...
CJENSEN_1
Regular Advisor

Re: Swap Question

Sounds good. This will be my second time igniting an HPUX server from a make_tape_recovery (the other time was on our 11.11 rp5470 server) - and it was to re-size contiguous lvol's. So I just wanted to make sure. Thanks. Points assigned.
CJENSEN_1
Regular Advisor

Re: Swap Question

thanks
chris huys_4
Honored Contributor

Re: Swap Question

Hi Colin,

A standard installed system comes with a # of Gbyte lvol2 swap, were lvol2 is both primary swap device and dumpdevice.

Instead of increasing the lvol2 swap to match the current amount of memory in the system, it would be better, if a small lvol2 is created of f.e. 4Gbyte and a dedicated second "lvol9" swap/dump volume, that is equal to the size of the memory plus 1 or 2 Gbyte, in your case 26 Gbyte. (in pa-risc days, it was size of memory + 10% to capture a full crashdump, but I think with large memory systems not the full 10% is needed anymore)


Then afterwards, remove the 'dump designation' of lvol2 , dedicating lvol2 to only being the primary swapdevice, and add the "dump designation" to lvol9 as, and offcourse "designate" lvol9 as secondary swapdevice.

When a "standard" "selective" crashdump now happens, the memory will, before "rebooting the system", "dump around 20-25% to lvol9".

After the system reboots, the crashdump "save" startupscript, will then write the crashdump from dumpdevice, lvol9, to a new crashdirectory in /var/adm/crash.

If lvol2 would be the dumpdevice, then the startup of the system, will "halt" at the "save crashdump" startupscript, until "the writing of the crashdump to /var/adm/crash" is done before moving on with the rest of the startupscripts.

With a system of 24Gbyte of memory, waiting for 6Gbyte (20% of memory), to be written away, isnt probably to bad, probably 5-6 minutes, but if a full crashdump, crashconf -v, is required, and the total of 24Gbyte of memory, needs to be written away to /var/adm/crash, the 5-6 minutes "extra waiting" becomes fast 20-24 minutes waiting.

With a seperate dumpdevice lvol9 of 26Gbyte, the "crashdump startupscript", initiates the crashdump saving, in the background, and immediately goes further with the next startupscript, which with "large memory systems", shortens the startup sequence considerably.

NOTE: some setting up needs to be done, to make the above possible, additionial swap/dump added, /etc/fstab adapted (swap and dump lines added for lvol9), crashconf -d , crashconf -s (make crashconfdevicelist "reboot" permanent", crashconf -v ,etc.. so make sure that you take a full (toc) crashdump, as a test , that it all works..

NOTE: no need to worry about having 2 swapdevices, if the system is paging, or only 1. Disk access is anyhow 1000times slower then memory access, and the difference between 2000times slower or "only 1000 times", slower is not, that big a difference, to the user, and he will rightfully complain in both cases. ;) If the paging is due to insufficient memory resources, due to legimate increasing usermemory demand, instead of ; bad kernel tuning/not following "standard" practices, user/kernel memory leaks, memory will need to be added anyway to stop the paging.

Greetz,
Chris