Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Total Process Memory > Heap + Non-Heap

Moderators: Vladimir Kondratyev, Anton Katilin

Total Process Memory > Heap + Non-Heap

Postby holocronweaver » Sat Apr 14, 2018 3:25 am

I am facing a Java process memory issue where:

* heap usage never rises above 2.2 GB, with 11 GB allocated
* garbage collection cleans up heap as expected
* non-heap hovers around 300 MB
* total process memory usage is greater than 60 GB

How is it that the process memory usage can be greater than the total allocated heap + non-heap memory? Can I use YourKit to identify the source of this issue?
holocronweaver
 
Posts: 2
Joined: Sat Apr 14, 2018 3:20 am

Re: Total Process Memory > Heap + Non-Heap

Postby Anton Katilin » Mon Apr 16, 2018 6:51 am

JVM may reserve more memory pages than shown as allocated heap. This likely depends on the OS and Java version.

What are the -Xmx/-Xms settings? Please try setting smaller heap limits.
Anton Katilin
 
Posts: 5824
Joined: Wed Aug 11, 2004 8:37 am

Re: Total Process Memory > Heap + Non-Heap

Postby holocronweaver » Tue Apr 17, 2018 8:21 pm

To clarify:

* I am running OpenJDK 8 on Linux.
* -Xmx12000M
* Total process memory usage gradually increases over time to reach 60 GB, but heap + non-heap never exceeds 2.2 GB. So it is not that the process allocates 60 GB from the start, this happens gradually.
holocronweaver
 
Posts: 2
Joined: Sat Apr 14, 2018 3:20 am

Re: Total Process Memory > Heap + Non-Heap

Postby Anton Katilin » Wed Apr 18, 2018 6:47 am

How do you measure the total process memory usage: by using corresponding graph in the profiling results or with a Linux command/tool?

Do you use any 3rd party native libraries? It is possible that the memory allocation happens in native code.

Does you application use memory mapped buffers (Java NIO)?

Could you please send to support@yourkit.com the snapshot (a download link) of the application.
Anton Katilin
 
Posts: 5824
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 15 guests

cron