Non heap memory and No of loaded classes keeps on increasing

We are doing a performance test of our application. During the test, we find that non heap memory and total no of loaded classes keeps on increasing over the time.

Our guess is probably some 3rd party jar or application code is leaking.

What are the best ways to find such leak or pin point the problem ? Any tools which can help me to find the rootcause ?

We are using Jboss EAP 6.1.


Make first Heap Dump by jvisualVm from JDK and analyze it with Memory Analyzer (MAT).

And then see in this direction at header 'Non-Heap': http://www.yourkit.com/


It sounds to me like something in your code could be continually creating new dynamic proxy classes. I think that that would give you a leak with the characteristics that you describe.

Other Q&A's explain general techniques for tracking down Java storage leaks; eg

  • How to find a Java Memory Leak
  • Tracking down a memory leak / garbage-collection issue in Java
  • I suggest you start by trying to identify the Class objects. I suspect that you will find that the off-heap memory allocations are associated with them; eg associated native code segments produced by the JIT compiler.


    The JVM ships with a couple of tools that let you look at the contents of the heap ( jhat and jmap ). Using these may allow you to see why you are seeing more than the expected number of loaded classes.

    I'd start there before trying to see the non-heap memory usage.

    链接地址: http://www.djcxy.com/p/19842.html

    上一篇: JVM进程大小和内存堆大小之间的巨大差异

    下一篇: 非堆内存和加载类的数量不断增加