查看垃圾回收情况

1、JDK8使用的垃圾收集器是什么
java -XX:+PrintCommandLineFlags -version

-XX:InitialHeapSize=266390080 -XX:MaxHeapSize=4262241280 -XX:+PrintCommandLineFlags
-XX:+UseCompressedClassPointers -XX:+UseCompressedOops
-XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

2、UseParallelGC 即 Parallel Scavenge + Parallel Old,再查看详细信息
java -XX:+PrintGCDetails -version

image.png

你可能感兴趣的:(查看垃圾回收情况)