1

I have one java program (doing lot of in memory operations). I have allocated 10GB java heap to the process (-Xmx). Total memory of the system is 30 GB. Java program is actually taking almost 24 GB of memory (I can see from svmon output). Java heap utlization is below 10 GB (from verbose GC). I would like to know what is using the rest of the memory (24-10 = 14 GB of memory)? Is it native heap? ( I dont have any JNI code or any other third party libray which can using JNI code). Could you please tell how can I monitor native memory usage?

OS :AIX

Java : IBM JVM 1.6

CPU : Power 7 SMT -4

Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
Nike
  • 312
  • 1
  • 2
  • 9
  • I had the same issue in Linux, with no answer: http://stackoverflow.com/questions/7386294/where-is-my-java-memory-going – Konrad Garus Nov 04 '11 at 13:00
  • Thanks Konrad for the reply!. If you are finding any solution please let me know. – Nike Nov 04 '11 at 13:16

4 Answers4

2

The other type of memory is non heap memory. Try to monitor the situation with JConsole.

In this page about YourKit I read:

The abnormal growth of non-heap memory size may indicate a potential problem, in this case you may check up the following:

  • If there are class loading issues such as leaked loaders. In this case, the problem may be solved with the help of Class loaders view.
  • If there are strings being massively interned. For detection of such problem, Allocation recording may be used.
stivlo
  • 83,644
  • 31
  • 142
  • 199
  • Unfortunately this is a production box and I can't run Jconsole in that box. All the ports are closed, so I can't connect remotely using jconsole (jmx). Is there any other way to generate gc log and identify from the log? – Nike Nov 04 '11 at 12:52
  • I found this [Java Garbage Collection Log Messages](http://stackoverflow.com/questions/895444/java-garbage-collection-log-messages)... I think such log on a running box will contain a lot of information. It will be difficult to analyse. It would be better to try to reproduce the problem in a test environment, if possible. – stivlo Nov 04 '11 at 13:09
  • I have analyzed the GC logs using IBM support Assistant tool. But its not showing any non-heap (native heap) utilization. Is there any specific parameter to generate native heap memory related information? – Nike Nov 04 '11 at 13:12
0

have you used any profiler? that will help you pin point what objects are consuming memory & what is happening in RAM

Anish Dasappan
  • 415
  • 2
  • 9
0

Thanks for the memory.

I just put this here: https://www.ibm.com/developerworks/java/library/j-nativememory-aix/

bpgergo
  • 15,669
  • 5
  • 44
  • 68
0

The IBM JMAT is a good tool, but that's a lot of memory to analyze. How certain are you that the amount of memory you're utilizing is appropriate for the objects you're manipulating? With a call stack that large I'd start probing for leaky references.

Mike Yockey
  • 4,565
  • 22
  • 41