jstat:幸存者和伊甸园的空间容量在一段时间内下降 [英] jstat : Survivor and Eden Space capacity decrease over a period

查看:293
本文介绍了jstat:幸存者和伊甸园的空间容量在一段时间内下降的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在重新启动JVM之前,java(8)的内存容量是否会减少?

Does anytime java(8) memory capacity decrease until JVM restart?

我正在使用jstat -gc转储内存信息,这是两天以来的快照.与第一个快照相比,第二个快照对SC1和EC的容量较小.

I am using jstat -gc to dump memory information and here is the snapshot from two days. The second snapshot has less captaity for SC1 and EC compared to the first snapshot.

有人可以帮助/解释为什么我看到这种行为吗?那是预期的吗?

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

推荐答案

有一个用于控制该标志的标志:-XX:+UseAdaptiveSizePolicy,默认情况下处于启用状态.根据您拥有的目标暂停时间(我假设使用的是G1),此标志的作用是根据所收集的启发式信息来增加或减少某些区域.了解其确切功能的最佳方法是G1本身的源代码.

There is a flag that controls that: -XX:+UseAdaptiveSizePolicy, which is enabled by default. 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. The best way to learn at what exactly it does is the source code of G1 itself.

这篇关于jstat:幸存者和伊甸园的空间容量在一段时间内下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆