1848509 Members
7341 Online
104030 Solutions
New Discussion

Defragment Memory

 
SOLVED
Go to solution
Paul D. Simpson
Frequent Advisor

Defragment Memory

Does anyone know how I can defragment physical memory on an N-class running HP-UX 11.0 ?
When I start oracle, I get an error about not enough contiguous memory, and I believe that other processes are coredumping without deallocating memory.
I need to clear up the "memory leaks" and defrag what is in use.
Any ideas?
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Defragment Memory

This sounds like you are running a 32-bit version of Oracle. If so, the answer is to install the 64-bit version of Oracle on your N-box and your problems should be over. If you must stick with 32-bit Oracle then look into a technique called memory windows (a search of docs.hp.com will yield everything you need.) The problem is that without memory windows all 32-bit applications share a common memory area but with memory windows each group of related processes can
have its own 4GB address space.

In general, the only way to "fix" your problem otherwise is to reboot and bring your applications up in the order you want.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Defragment Memory

As Clay said, this is shared memory fragmentation. Oracle's SGA uses shared memory and there is only one map for ALL 32bit applications. When you stop and restart apps a lot, this area can easily become fragmented. The command ipcs -bmop will show the currently allocated shared memory segments but does not show fragmentation.

The correct solution is to use 64bit Oracle but a many middleware vendors don't seem to know anything about 64bit computing, you may be stuck. So the solution is to give each Oracle instance it's own private memory window.

Before you start, bring your system up to date on patches (several are required for memory windows to work). Then inventory all your Oracle executables and applications that will access SGA and script them into startup procedures so all will have access to the privately-mapped SGA.


Bill Hassell, sysadmin
SS_6
Valued Contributor

Re: Defragment Memory

To defrag do. Example for /usr
#fsadm -F vxfs -DEde /usr
you can also do following just to view.
#fsadm -F vxfs -DE /usr (use mount point)



By providing solutions I am helping myself
Paul D. Simpson
Frequent Advisor

Re: Defragment Memory

Thanks all for the info...

I have verified that we are running 64bit oracle.

Any other suggestions?
Bill Hassell
Honored Contributor

Re: Defragment Memory

You may have very low kernel parameters for shared and local memory. For local memory, the parameter is maxdsiz_64. Change this to something much larger than you need, perhaps 4Gb (4 followed by 9 zeros). For shared memory, Oracle usually requests each shared memory segment in 1Gb chunks so set shmmax to 1.5Gb (15 followed 8 zeros). Note that maxdsiz must always be smaller than maxdsiz_64 so if maxdsiz is set to 2Gb, set maxdsiz_64 to 3 or 4Gb. These are maximum limits so it doesn't really matter how big you set them--they don't consume any memory, they just limit the maximum value. Also take a look at:

ipcs -bmop


Bill Hassell, sysadmin
Nicolas Dumeige
Esteemed Contributor

Re: Defragment Memory

What is the ORA error you get at startup ?

Use oerr ora facility to get more info :
#oerr ora 04030
04030, 00000, "out of process memory when trying to allocate %s bytes (%s,%s)"
// *Cause: Operating system process private memory has been exhausted
// *Action:

If you have an Oracle support account, login to metalink.oracle.com and feed a Service Request for this error.

Cheers
All different, all Unix
Paul D. Simpson
Frequent Advisor

Re: Defragment Memory

Increased shmmax parameter & rebooted. Oracle started with no issues in a single memory segment.