标签:4.0 取消 pac byte free 一个 reg ini jmap
jdk内存实际是jvm内存,jvm有一个运行时数据区,其实就是对这一部分的大小分配。
运行时数据区通常包括这几个部分:程序计数器(Program Counter Register)、Java栈(VM Stack)、本地方法栈(Native Method Stack)、方法区(Method Area)、堆(Heap)
在JDK1.8中,取消了PermGen,取而代之的是Metaspace,所以PermSize和MaxPermSize参数失效,取而代之的元空间:
例如下面配置设置元空间的大小和最大大小:(等同于JDK7的永久区)
-XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=128m
例如:weblogic设置JVM参数:
-Xms2056m -Xmx2056m -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=512m
查看JVM参数:
第一种:jps+jmap
C:\Users\Administrator>jps 16740 Main 8388 Jps 4248 11564 Server 11884 NetworkServerControl C:\Users\Administrator>jmap -heap 11564 Attaching to process ID 11564, please wait... Debugger attached successfully. Server compiler detected. JVM version is 25.121-b13 using thread-local object allocation. Parallel GC with 4 thread(s) Heap Configuration: MinHeapFreeRatio = 0 MaxHeapFreeRatio = 100 MaxHeapSize = 2155872256 (2056.0MB) NewSize = 718274560 (685.0MB) MaxNewSize = 718274560 (685.0MB) OldSize = 1437597696 (1371.0MB) NewRatio = 2 SurvivorRatio = 8 MetaspaceSize = 536870912 (512.0MB) CompressedClassSpaceSize = 1073741824 (1024.0MB) MaxMetaspaceSize = 536870912 (512.0MB) G1HeapRegionSize = 0 (0.0MB) Heap Usage: PS Young Generation Eden Space: capacity = 538968064 (514.0MB) used = 132464928 (126.32839965820312MB) free = 406503136 (387.6716003417969MB) 24.577509661129014% used From Space: capacity = 89653248 (85.5MB) used = 89640016 (85.48738098144531MB) free = 13232 (0.0126190185546875MB) 99.98524091397113% used To Space: capacity = 89653248 (85.5MB) used = 0 (0.0MB) free = 89653248 (85.5MB) 0.0% used PS Old Generation capacity = 1437597696 (1371.0MB) used = 75478984 (71.98236846923828MB) free = 1362118712 (1299.0176315307617MB) 5.250355103518475% used 61705 interned Strings occupying 7127136 bytes.
第二种:用JDK自带的工具 jconsole或者jvisualvm:
标签:4.0 取消 pac byte free 一个 reg ini jmap
原文地址:https://www.cnblogs.com/qlqwjy/p/9668473.html