5. Tracking Down a Native Leak
• HS2 Memory keeps growing up to 60GB+ process memory however the heap usage remains low.
Indication of Native leak.
6. Tracking Down a Native Leak
• JVM instrumented with Jemalloc
• An alternative implementation of malloc
suited for high performance environment
with great profiling abilities.
• Pinpoint the root cause to inflate methods
In zlib package.
• Tougher Task: Tying Native Methods to
JVM methods.
7. Tracking Down a Native Leak
• ZipInputStream / JarInputStream is a typical source of
such memory leaks, for example, when a
Class.getResourceAsStream is not closed after use.
• Short Term Fix
‒ Decompress JARs used by process (pmap analysis)
• Long Term Fix
‒ Heap Dump Analysis with Visual VM
for Inward References to java.util.zip.Inflater
‒ Root Cause - Session state leak on close resources