Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

memory leakes from oracle client libraries on hpux 11i

SOLVED
Go to solution
Shivkumar
Super Advisor

memory leakes from oracle client libraries on hpux 11i

Hi,

We suspect that there are memory leakage from some oracle 9.2.x.x client libraries runnning on hpux 11i vi.
Can someone suggest some commands of hpux or tools to identify which libraries are producing the memory leaks ?

Thanks,
Shiv
14 REPLIES
Ken Grabowski
Respected Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Glance will allow you to monitor processes including the memory they are using.
Bill Hassell
Honored Contributor
Solution

Re: memory leakes from oracle client libraries on hpux 11i

A memory leak is a simply unwanted or unexpected growth of a program's data area. The key is "unwanted/unexpected". If true, then it is a symptom of bad programming. However, it is quite normal for many programs to grow in size because that is required. You can monitor the largest programs for memory growth by sorting the processes by size:

UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20

Just run this on a regular basis to monitor the largest processes. Now memory usage in Unix is complex and the processes may not be growing but shared memory may be growing. ipcs -bmop will monitor this, but it will be difficult to find which process is growing the segment. And be sure your buffer cache is reasonable (no more than 800 to 1500 megs).


Bill Hassell, sysadmin
Shivkumar
Super Advisor

Re: memory leakes from oracle client libraries on hpux 11i

Bill, Could you please explain the statement in great detail "Now memory usage
in Unix is complex and the processes may not be growing but shared memory may be growing"

Apreciate help from any Unix Guru of the forum.

Thanks,
Shiv
RAC_1
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

The memory management on HP-UX is complex as it is a virtual memeory, shared memory, stack, text and data. All these are inerrelated. So when bill said, the shared ememory usage might be going up, a processes might not be increasing it's text, or stack but might be growing in shared memory and finding which processes is how much shared memory a little difficult.

There is shminfo toll that may help you. Also if you monitor shared memory usage with ipcs -m, and you see over a period of time the usage is going up, you need to start at looking which user is using it and associate it with pid and troubleshoot it further.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Hi Shiv,

Finding out memory leak is not an easy task, sometimes you may be fooled around by memory. If you are good in debugging, you can find out memory leak with GDB. Otherwise, better log a call with Oracle Support, they might help you.

BTW, Have you checked the latest patches available for Oracle as well as HP-UX ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bill Hassell
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Shared memory is a technique that programmers use to allow multiple programs to share information at memory speeds. The main program requests a shared memory segment, then communicates the segment ID to certain programs that will use this same area. In Oracle, this is called SGA and Oracle programs will will allocate the area as required. That is not a memory leak, it is the design of the program. If you are trying to run Oracle in just a couple of Gb of RAM, you will have a lot of problems with performance.


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Shalom Shivkumar,

I find memory leaks by watching a process either with glance or a UNIX95 ps command.

It the amount of memory for a process continues to grow over time, its a suspect.

These problems are sometimes solved with Operating System patches, but more often with patches to the application.

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
Arunvijai_4
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Hi Shiv,

A very white good paper,
http://docs.hp.com/en/1218/mem_mgt.html

-Arun

"A ship in the harbor is safe, but that is not what ships are built for"
Shivkumar
Super Advisor

Re: memory leakes from oracle client libraries on hpux 11i

Is someone aware of any 3rd party tools used to detect memory leaks on HPUX platform from OS and different kind of applications running on it ?

Regards,
Shiv
Bill Hassell
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

As mentioned before, a memory leak is a programming error. If you did not write the code, special tools to monitor for incorrect handling of memory won't be of much use. You need the source code to the programs and an understanding of how the programs work so they can be fixed. If you don't have a programming staff, all you need to monitor are the program sizes with ps as mentioned above. Then call the manufacturer to see if the growth in memory usage is normal or a bug.


Bill Hassell, sysadmin
Arunvijai_4
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Hi Shiv,

As Bill said, you have to have source code handy with you before start using any 3rd party tools. Anyways, here are some tools available to detect memory leaks

Rational Purify ($$$)
http://www.ibm.com/software/awdtools/purifyplus/

Insure++ ($$$)

Valgrind
http://developer.kde.org/~sewardj

MEMWATCH
http://www.linkdata.se/sourcecode.html

A very good reading
http://en.wikipedia.org/wiki/Memory_leak

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Shivkumar
Super Advisor

Re: memory leakes from oracle client libraries on hpux 11i

Hi Arun,

I have heard of Rational Purify and some other tools for detecting memory leakage. What surpriese me is that most of the enterprise are using tools for testing applicaton packages which doesn't detect memory leakage and exceptions in the coding.

I have seen mostly people use mercury test tools and other similar tools just to check some other fuctionalities.

It surprises me for few thousands dollars cost of Rational Purify tools, enterprises are taking risk of not testing their applications for memory leakage and extensive excetpion handling.

Seems like developers are not aware of these tools.


Thanks,
Shiv
Arunvijai_4
Honored Contributor

Re: memory leakes from oracle client libraries on hpux 11i

Hi Shiv,

Most of the Enterprise applications will go through an extensive Performance and Reliability testing. P&R team is responsible for detecting memory leak errors. In Linux, Valgrind is the best way of detecing memory leaks.

I feel, you should rasie a ticket with Oracle support to dig in further.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Shivkumar
Super Advisor

Re: memory leakes from oracle client libraries on hpux 11i

Does HP's has any tool similar to Rational PurifyPlus ?

Thanks,
Shiv