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; e.g.
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; e.g. 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.