1832932 Members
3074 Online
110048 Solutions
New Discussion

Memory Fragmentation

 
Ali Bajunaid
Advisor

Memory Fragmentation

We have an RP8400 system with a memory of 8GB and 4 CPU. we notice when we start an application or Oracle DB 9i and stop it, we found the memory free from Glance is decresaing. So how we can fix this without rebooting the machine.
4 REPLIES 4
Chris Wilshaw
Honored Contributor

Re: Memory Fragmentation

It sounds like one of the applications has a memory leak (although this should stop if the app itself is stopped.

Try running

UNIX95= ps -eo pid,vsz,args | sort -rnk2 | more

This will give the PID, memory use in KB and name of all programs running, sorted by memory.

Running this command at intervals will show you which process(es) are consuming more memory.

One possibility would be the mib2agt process, which under HP-UX 11 has a known leak. If this is the case, patch PHSS_21046 can be installed to solve the problem. This patch doesn't require a reboot.

harry d brown jr
Honored Contributor

Re: Memory Fragmentation


make sure you have your machine up-to-date in patches. If the problem persists, contact Oracle, then HP.

live free or die
harry
Live Free or Die
Bill Hassell
Honored Contributor

Re: Memory Fragmentation

It may have to do with the method of shutdown for Oracle and related applications. Don't ever use kill -9 in shutdown scripts or manually from the keyboard. I know a lot of basic Unix classes talk about it but kill -9 gives the applications no opportunity to cleanly terminate and return resources such as RAM back to the system. This is especially true for apps that use shared memory.

You can see if this is true with ipcs -bmop and look for NATTACH=0 for some segments. These segments can be removed with ipcrm but I would be cautious to make sure no processes are still referencing these segments.


Bill Hassell, sysadmin
Dietmar Konermann
Honored Contributor

Re: Memory Fragmentation

The free memory reported by Glance is free physical memory (freemem)... you should never watch for this metric if your are looking for application memory leaks. Instead have a look for at the swap statistic, i.e. the "Total Free" metric reported by swapinfo -t.

The freemem metric will never return to the exact same value if you start/stop a database. This is normal and nothing to worry about.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)