1834456 Members
2687 Online
110067 Solutions
New Discussion

Secondary swap

 
MarkSyder
Honored Contributor

Secondary swap

Hi everybody.

A user on an HP-UX 11i workstation is suffering every day from an "out of virtual memory" error message. The swap space is in accordance with HP's recommendations.

I have set up an area of filesystem swap, the same size as the main swap, and rebooted the ws. Unfortunately, the fault has not gone away and the system does not appear to be using the secondary swap. I have given the secondary swap priority 1, the same as main swap.

Any ideas?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
10 REPLIES 10
Mark Grant
Honored Contributor

Re: Secondary swap

Does the new swap show up as available when you do an "swapinfo -mt"?

Did you put the swap in /etc/fstab?

Does it work if you activate it manually with "swapon -a"?
Never preceed any demonstration with anything more predictive than "watch this"
Mark Grant
Honored Contributor

Re: Secondary swap

By the way, congratulations on the new hat :)

No points for this one please.
Never preceed any demonstration with anything more predictive than "watch this"
MarkSyder
Honored Contributor

Re: Secondary swap

Yes to all three questions!

Thanks Mark - as you may have guessed, this is the first time I've set up secondary swap. It now shows as enabled so I hope this will get rid of the problem.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: Secondary swap

Mark,

Thanks for the congratulations too!

I was on 233 this morning and was hoping to get it next week. A flurry of activity (i.e. questions that I knew the answer to!)and I got it earlier than expected.

Mark
The triumph of evil requires only that good men do nothing
Trond Haugen
Honored Contributor

Re: Secondary swap

Wee need some more information here. The system is not likely running out of swap but the ouput of 'swapinfo -tm' will tell how much is actuallu used. As opposed to reserved.
secondly what command gives the "out of virtual memory" error message. If you happen to know how much memory is requested that would be verry useful.
How much RAM does the WS have and have any kernel parameters been changed?

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Geoff Wild
Honored Contributor

Re: Secondary swap

A couple of question for you:

How much memory is in the workstation?

How much primary and file system swap is there?

What is dbc_max_pct set to? The % should be no more then about 300-350 MB - so if you have a GB of ram, then set to say 30 or 35.
If 512 or lees, then you may have to leave at the default of 50 - though I have a B2000 with 768 MB of ram and I have mine set to 30.

What is maxdsiz set to? you may need to increase...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
G. Vrijhoeven
Honored Contributor

Re: Secondary swap

Mark,

Congrats on you new hat!

Can not help you but i like to give you some more info, swapinfo -tam will give more info.
I you give pri swap a higher prio since it is faster as filesystem swap. so only extra swap users the filesystem.
Kernel config maxswapchunks must high enough to be able to use it.
Swapspace can be added online swapon ( -f if lvol had filesystem on it) command if swapchunks is high enough.

Gideon
Steven E. Protter
Exalted Contributor

Re: Secondary swap

swapinfo should show all swap areas.

Congrats on the hat.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Don Morris_1
Honored Contributor

Re: Secondary swap

Assuming that the "out of virtual memory" error is a translated version of ENOMEM - it may not be a swap issue at all. As mentioned by others, knowing what's failing might help... but my gut instinct is that the user program is hitting maxdsiz / maxdsiz_64bit for their heap (malloc/brk/sbrk failure)... which will give an ENOMEM error.

If the user doesn't have the source or doesn't want to recompile to give further information at the point of failure -- you could try monitoring the process using pstat or glance... but if the bug is that the user code asks for some huge value in one call (say malloc with a negative value that got cast to an unsigned) you're not going to catch it without parsing the source.

If the user is the only one on the box - you could experiment with just raising the tunable to the maximum and seeing if the problem goes away [and if the app grabs a bunch of virtual memory].
Sridhar Bhaskarla
Honored Contributor

Re: Secondary swap

Hi Mark,

Did you see 'swapinfo -tam' output when you got the "out of virtula memory' error?.

If the "total" column is 100%, irrespective of whever you paged out or not, you will not be able to bring up processes that need more swap than is available.

If not, then it could be one of your max*siz* parameters.

On a side note, I would configure the secondary swap with a priority 0 so it will be used first in case the system has to page out.

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