简体   繁体   English

jstat : Survivor 和 Eden Space 容量在一段时间内减少

[英]jstat : Survivor and Eden Space capacity decrease over a period

Does anytime java(8) memory capacity decrease until JVM restart? java(8) 内存容量是否会一直减少直到 JVM 重新启动?

I am using jstat -gc to dump memory information and here is the snapshot from two days.我正在使用 jstat -gc 转储内存信息,这是两天的快照。 The second snapshot has less captaity for SC1 and EC compared to the first snapshot.与第一个快照相比,第二个快照具有更少的 SC1 和 EC 容量。

Can someone help/explain why I am seeing this behavior?有人可以帮助/解释为什么我会看到这种行为吗? is that expected?这是预期的吗?

Java version : java-1.8.0-openjdk-1.8.0.191.b12

sc1: survivor space 1 capacity  
EC: eden space capacity 

S0C,    S1C,  S0U,  S1U,EC,EU,OC,OU,MC,MU,CCSC,CCSU,YGC,YGCT,FGC,FGCT,GCT
4096.0,7168.0,3968.3,0.0,123904.0,54705.9,101888.0,24165.6,62464.0,60100.6,7168.0,6618.4,30,1.314,3,0.298,1.612  
5632.0,4096.0,0.0,4000.2,113152.0,56035.3,101888.0,24165.6,62720.0,60145.3,7168.0,6620.0,33,1.345,3,0.298,1.643

There is a flag that controls that: -XX:+UseAdaptiveSizePolicy , which is enabled by default.有一个标志控制: -XX:+UseAdaptiveSizePolicy ,默认情况下启用。 What this flag does, based on the target pause time you have (you are using G1 I assume), is increase or decrease certain regions based on the heuristics it gathers.根据您拥有的目标暂停时间(我假设您正在使用G1 ),此标志的作用是根据它收集的启发式增加或减少某些区域。 The best way to learn at what exactly it does is the source code of G1 itself.了解它究竟做什么的最好方法是G1本身的源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM