Operating System - HP-UX
1752790 Members
5833 Online
108789 Solutions
New Discussion юеВ

Memory Leak with Java or OS's memory allocation, VSZ?

 
Craig C Lee
Occasional Contributor

Memory Leak with Java or OS's memory allocation, VSZ?

We are running into what appears to be a memory leak in java with a program that we are developing.

The growth has been confirm on a 12day test. When we look at garbage collection with hpjtune, and jmeter, it appears to releasing the heap memory properly.

Does anyone have a good answer to why VSZ is so different than the rate of growth for all of the other metrics?

Have you seen a java leak like this before? Is is the way the OS allocates memory where we are not actually leaking memory, as seen by jmeter?

Here are some metrics after 12 hours on the situation:

This is data from HP/UX 11.2:

Top start size: 262mb
Top End size: 278mb

Top res: 78mb
Top red end: 91mb

VSZ Start: 25968k
VSZ end: 42352k

procinfo pages start: 67561
procinfo pages stop: 71675

glance RSS start: 81.2mb
glance RSS stop: 93.9mb



bash-3.2# ./java -version
java version "1.5.0.07-_20_mar_2007"
Java(TM) 2 Runtime Environment, Standard Edition (IBM build 1.5.0.07-_20_mar_2007-05_31 20070511)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0.07 jinteg:03.20.07-12:50 IA64W, mixed mode)
IBM Java ORB build orb50-20070501 (SR5)
XML build XSLT4J Java 2.7.7
XML build IBM JAXP 1.3.7
XML build XML4J 4.4.9
2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: Memory Leak with Java or OS's memory allocation, VSZ?

>When we look at garbage collection with hpjtune, and jmeter, it appears to releasing the heap memory properly.

Then you probably shouldn't look further unless you think you a leak in some JNI code.
The whole purpose of java is to use ALL of the memory that as been allocated to it. It then will garbage collect to free up more space for that process and no others.

The VSZ size also include the text size.

If you have a support contract, you can ask the Response Center for help on java.
Steven E. Protter
Exalted Contributor

Re: Memory Leak with Java or OS's memory allocation, VSZ?

Shalom,

Try a memory leak detector.

http://www.hpux.ws/?p=8

Works on HP-UX, Linux or Sun.

Report bugs back to me.

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