Java process memory management diagrams
There are a huge number of articles and diagrams on this topic on the Internet, however, in my opinion, none of them allows you to form a general idea of the memory use in the Java process. And without a general understanding, it is difficult to find solutions to specific memory problems in complex systems. As a result, I decided to post my diagrams.
Simplified diagram of Java memory usage of a process:
Detailed diagram of Java memory usage of a process by some parameters:
List of JVM parameters for Copy Paste
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
-XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -XX:+PrintGCDetails -Xlog:gc+heap -XX:+HeapDumpOnOutOfMemoryError -XX:+UseSerialGC -XX:+UseParallelGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseG1GC -XX:+UseShenandoahGC -XX:+UseZGC -XX:+UseEpsilonGC -XX:MinRAMPercentage -XX:MaxRAMPercentage-Xms -Xmx -XX:-AdaptiveSizePolicy -XX:MetaspaceSize -XX:MaxMetaspaceSize -XX:MinMetaspaceFreeRatio -XX:MaxMetaspaceFreeRatio -n jvmJavaOSStackSize -Xss -XX:VmThreadStackSize -XX:CompilerThreadStackSize -XX:+PrintGCDetails -XX:+TraceClassUnloading -XX:+TraceClassLoading -XX:CompressedClassSpaceSize -XX:-UseCompressedClassPointers -XX:+PrintStringTableStatistics -XX:StringTableSize -XX:+UseStringDeduplication -XX:+PrintCodeCache -XX:InitialCodeCacheSize -XX:ReservedCodeCacheSize -XX:CodeCacheExpansionSize -n jvmNativeStackSize -XX:MaxDirectMemorySize -XX:NativeMemoryTracking=off | summary | detail -XX:+PrintNMTStatistics -XX:-AutoShutdownNMT -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation -XX:+PrintFlagsFinal -XX:CICompilerCount -XX:CompileThresholdn -XX:-TieredCompilation -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9099 -Dcom.sun.management.jmxremote.rmi.port=9099 -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=0.0.0.0 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000 |
A short list of diagnostic tools
1 2 3 4 5 6 7 8 |
JProfiler VisualVM JConsole Java Flight Recorder async-profiler JDK Mission Control jstack jmap |
These diagrams are not intended to provide complete knowledge, but they can be a starting point in exploring the topic deeper, filling knowledge gaps, tuning the JVM, and finding the problem in the current system.
Related Posts
Leave a Reply Cancel reply
Service
Categories
- DEVELOPMENT (103)
- DEVOPS (53)
- FRAMEWORKS (26)
- IT (25)
- QA (14)
- SECURITY (13)
- SOFTWARE (13)
- UI/UX (6)
- Uncategorized (8)