问题来源:https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/considerations.html
问题详情:Example 11-1 Typical Heap Printout
Heap
PSYoungGen total 10752K, used 4419K
[0xffffffff6ac00000, 0xffffffff6b800000, 0xffffffff6b800000)
eden space 9216K, 47% used
[0xffffffff6ac00000,0xffffffff6b050d68,0xffffffff6b500000)
from space 1536K, 0% used
[0xffffffff6b680000,0xffffffff6b680000,0xffffffff6b800000)
to space 1536K, 0% used
[0xffffffff6b500000,0xffffffff6b500000,0xffffffff6b680000)
ParOldGen total 20480K, used 20011K
[0xffffffff69800000, 0xffffffff6ac00000, 0xffffffff6ac00000)
object space 20480K, 97% used
[0xffffffff69800000,0xffffffff6ab8add8,0xffffffff6ac00000)
Metaspace used 2425K, capacity 4498K, committed 4864K, reserved 1056768K
class space used 262K, capacity 386K, committed 512K, reserved 1048576K
In the line beginning with Metaspace
, the used
value is the amount of space used for loaded classes. The capacity
value is the space available for metadata in currently allocated chunks. The committed
value is the amount of space available for chunks. The reserved
value is the amount of space reserved (but not necessarily committed) for metadata. The line beginning with class space
line contains the corresponding values for the metadata for compressed class pointers.
问题:
- 在这段gc日志中,metaspace和class space分别代表什么?
- metaspace和class space的日志统计信息中used、capacity、committed、reserved是什么意思?