cancel
Showing results for 
Search instead for 
Did you mean: 

Swap space HP-UX 11iv2

Jamie A Dennis
Frequent Advisor

Swap space HP-UX 11iv2

Hello,

Been a while since I've done much HP-UX, and would like an opinion on swap space configuration. Our Oracle team wants 16 GB swap on a server with 32 GB memory. Is it better to have one large (16 GB) swap space, or 2 - 8 GB swap spaces in HP-UX 11iv2 (B.11.23)?

Thanks!

"If hindsight is 20/20, why don't more people use their rearview mirrors?" - James (Jamie) A. Dennis, 1998
6 REPLIES
Greg Vaidman
Respected Contributor

Re: Swap space HP-UX 11iv2

if you have multiple spindles to put the swap on, then multiple swap spaces will give you better swap performance. note that if you have 2 physical direct-attach disks in vg00, this is moot, because you'll want to mirror swap. if you have spindles you can dedicate to swap, then spread it evenly among all of them, and give them all the same priority - that will effectively stripe swap across those spindles.

of course, with 32GB of memory, assuming a reasonably sized application, you probably won't be swapping anyway, so do what's easiest!
James R. Ferguson
Acclaimed Contributor

Re: Swap space HP-UX 11iv2

Hi:

It doesn't matter. You don't want to swap. You need swap space for swap reservation purposes, but otherwise you don't want to use it. That is, you need to account for the memory of a process should it ever be paged out to disk (the reservation).

If you actually perform swap I/O though, performance is already degraded. The configuration of swap spaces may or may not make a small difference in already bad performance.

Regards!

...JRF...
Prema Krcmar
Occasional Visitor

Re: Swap space HP-UX 11iv2

Hi,

swap space size of half of the memory is reasonable (and minimal) configuration.
Device swap is always slow against memory (but faster then on filesystem), so it should be on fastest drives - local drives, not SAN/NAS.
If you have just 2 drives and they are not mirrored on HW level do not mirror volumes. Just create 2 same volumes on each drive, format them as swap and assign same priority - which will work as striped volume and it will increase performance.
Duncan Edmonstone
Honored Contributor

Re: Swap space HP-UX 11iv2

when you look at the relative speeds of memory access vs disk access you quickly realise there is NO POINT in trying to "optimize" your swap disk speed.

Consider:

a typical memory access might take 150ns (nano-seconds or billionth of a second). so that's:

0.00000015s

a typical disk access on a nice fast disk system could realistically get as good as 4ms (milli-seconds or thousandth of a second). so that's:

0.004s

So thats a difference of about 26,000 times!

To put that into context its like comparing a man walking (4mph) to some future concept spacecraft travelling at 100,000mph. If the man optimizes what he's doing (starts running) in relative terms its not going to make much difference.

So just make sure you *have* swap, but really don't worry about the performance of it - it really won't matter.

HTH

Duncan

HTH

Duncan
Jozef_Novak
Respected Contributor

Re: Swap space HP-UX 11iv2

Hello,

if you have multiple spindles and you are using LVM, you can have one "large" volume instead of several smaller ones and still benefit from load sharing. Just use distributed allocation policy (-D y parameter in lvcreate command) for the logical volume that you will use for paging and spread the volume across multiple physical volumes.

J.
T G Manikandan
Honored Contributor

Re: Swap space HP-UX 11iv2

To answer your question:
What I would do would be to divide as multiple swap on the server so that you have one primary swap space which is essential for operating system and you can have multiple secondary swap devices configured.Incase of true swapping then you would have distributed I/O with swapping.

secondly, I dont think your application is going to use the entire 32G RAM mostly, so I would recommend you to enable pseudo_swap(using swapmem_on kernel parameter) so that the server uses the memory as swap for better performance.

I would also recommend you to read the memory management whitepaper.
http://docs.hp.com/en/5965-4641/ch01s09.html