如何计算幸存者的大小

时间:2016-12-28 03:18:20

标签: java jvm jvm-hotspot

以下是堆使用信息来自jmap -heap,我使用的是Java 1.8,我注意到幸存者空间的容量只有40MB,我会问这个40MB是如何计算的。

具有8个螺纹的垃圾优先(G1)GC

Heap Configuration:
   MinHeapFreeRatio         = 40
   MaxHeapFreeRatio         = 70
   MaxHeapSize              = 17179869184 (16384.0MB)
   NewSize                  = 1073741824 (1024.0MB)
   MaxNewSize               = 10301210624 (9824.0MB)
   OldSize                  = 5452592 (5.1999969482421875MB)
   NewRatio                 = 2
   SurvivorRatio            = 6
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 2147483648 (2048.0MB)
   G1HeapRegionSize         = 8388608 (8.0MB)

Heap Usage:
G1 Heap:
   regions  = 2048
   capacity = 17179869184 (16384.0MB)
   used     = 2224567944 (2121.513313293457MB)
   free     = 14955301240 (14262.486686706543MB)
   12.948689656332135% used
G1 Young Generation:
Eden Space:
   regions  = 74
   capacity = 5368709120 (5120.0MB)
   used     = 620756992 (592.0MB)
   free     = 4747952128 (4528.0MB)
   11.5625% used
Survivor Space:
   regions  = 5
   capacity = 41943040 (40.0MB)
   used     = 41943040 (40.0MB)
   free     = 0 (0.0MB)
   100.0% used
G1 Old Generation:
   regions  = 187
   capacity = 3179282432 (3032.0MB)
   used     = 1561867912 (1489.513313293457MB)
   free     = 1617414520 (1542.486686706543MB)
   49.126428538702406% used

0 个答案:

没有答案