jokerconf Joker 2018 (19.10.2018)

Sorting out memory of a Java process

img

We’ll explore which structures of the virtual machine take in virtual memory, how to monitor and manage its consumption. We’ll study different strategies of virtual memory management and learn what was changed in the new versions of JDK. We’ll examine the real cases of native memory leak and get to know the tools of allocations analysis.

Does JVM parameter -Xmx4G mean that the process will take less than 4 GB in the system? Of course not. What else can take in virtual memory and, more importantly, how much of it? This question becomes even more pressing when you need to distribute resources between multiple processes or try to run Java in container.

Besides the virtual machine itself libraries and user apps can also be greedy for memory. You can easily notice Java objects leak with the help of Heap Dump, but the native memory leak can leave your head spinning.

In this talk we’ll explore which structures of the virtual machine take in virtual memory, how to monitor and manage its consumption. We’ll study different strategies of virtual memory management and learn what was changed in the new versions of JDK. We’ll examine the real cases of native memory leak and get to know the tools of allocations analysis.