Operating System - HP-UX
1832317 Members
1999 Online
110041 Solutions
New Discussion

pseudo swap vs. device swap

 
SOLVED
Go to solution
Morten Kristiansen
Frequent Advisor

pseudo swap vs. device swap

Hi,

I'm wondering abount swap setting in the kernel and OS.

We have one host with 16 GB of memory, pseudoswap is on (swapmem_on = 1) and we have a device swap of 4 GB.

The system is not suppose to swap, but what happens if it does start to swap. Say some DBA is setting the SGA/PGA size to high so that it will allocate 20 GB of memory when the database starts. What happens then?

In our case the system froze. And when the DBA killed the startup prosess (start of DB), I was able to login. But I couldn't start SAM or anything else. In the end I had to reboot, but even the reboot froze and I had to turn the power off and reboot.

So should I then actually set up enough swapspace on a device to prevent such behavior or is there anything else I could do?
6 REPLIES 6
Sanjay Kumar Suri
Honored Contributor

Re: pseudo swap vs. device swap

Set up enough swapspace on a device and monitor its usage and make adjustments as necessary.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Morten Kristiansen
Frequent Advisor

Re: pseudo swap vs. device swap

And how much swapspace should I allocate? Should it be the same amount as physical memory, 1.5 times, 2 times physical memory, or something else?

And what's the reason of setting it to that amount?
Bharat Katkar
Honored Contributor

Re: pseudo swap vs. device swap

Morten,
First try creating the device sawp of 16 GB and monitor the performance. I hope that should work.
In case you face any problem try increasing it 1 1/2 times of your Memory.
I think 1x is ok for you.

Regards,
You need to know a lot to actually know how little you know
Sanjay Kumar Suri
Honored Contributor
Solution

Re: pseudo swap vs. device swap

Set it up same as 16 GB and then monitor. Refer following links also for lot of inputs:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=147580
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=483127

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Sridhar Bhaskarla
Honored Contributor

Re: pseudo swap vs. device swap

Hi,

It is a good idea to keep the device swap equal to the memory even if you enabled swapmem_on otherwise you may not be able to use all of your memory. This is because as the system is used, the memory reserved to allocate swap will be gradually reduced.

In your case, having atleast 20GB of virtual memory (swap) is required otherwise you will not be able to start the database. So, before starting the database, run 'swapinfo -t' and make sure the "KB free" is atleast 20GB otherwise you will run out of swap.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ted Buis
Honored Contributor

Re: pseudo swap vs. device swap

If you have more swap space on disk than RAM, then you can turn off pseudo-swap. The HP-UX 11i Internals book by chris cooper and chris moore discusses this on pages 194-195.
Mom 6