Survivor Space未在JVM中使用 [英] Survivor Space not getting used in JVM

查看:100
本文介绍了Survivor Space未在JVM中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我的32位Linux服务器的2 GB RAM四核处理器中的GC设置



设置完成后,我的幸存者空间根本没有得到使用和主要GC每5至10分钟发生1至2分钟。





-XX:MaxNewSize = 1024M

-XX:MaxPermSize = 256M

-XX:NewSize = 1024M

-XX:SurvivorRatio = 6

-Xms1792M

-Xmx1792M

-XX:+ UseCMSInitiatingOccupancyOnly

-XX:+ UseConcMarkSweepGC

-XX:-UseAdaptiveSizePolicy

-XX:CMSInitiatingOccupancyFraction = 60





请检查并告诉我为什么Survivor Space没有被使用,主要GC每10分钟发生一次。

Below is my GC settings in my 32 bit Linux Server of Quad Core processor of 2 GB RAM

After setting this , my Survivor Space is not at all getting used and Major GC happening on every 5 to 10 mins for 1 to 2 mins.


-XX:MaxNewSize=1024M
-XX:MaxPermSize=256M
-XX:NewSize=1024M
-XX:SurvivorRatio=6
-Xms1792M
-Xmx1792M
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+UseConcMarkSweepGC
-XX:-UseAdaptiveSizePolicy
-XX:CMSInitiatingOccupancyFraction=60


Kindly check and let me know why the Survivor Space is not getting used and Major GC happening for every 10 mins.

推荐答案

我不是java gc大师,但我知道单独这些设置不会让你开心或悲伤,因为一切都取决于内存使用情况。你的2GiB RAM很可能太小了。但没有详细的内存使用情况统首先,我建议您参考以下文章: http://www.curiousmentality。 co.uk/2011/11/tuning-jvm-memory-settings/ [ ^ ]。使用VisualVM收集数据。
I am not a java gc guru, but I know that these settings alone won''t make you happy or sad, since everything depends on the memory usage. Your 2GiB RAM is much likely too small. But nobody can tell more without detailed memory usage statistics. First of all, I suggest you consult following article: http://www.curiousmentality.co.uk/2011/11/tuning-jvm-memory-settings/[^] . Use the VisualVM for gathering data.


了解堆空间 [ ^ ]



阅读垃圾收集器 [ ^ ]



如果你的应用没有幸存的pojos,那么堆''没有使用幸存者空间。

幸存者是使用JNI连接到某些C编码时的典型问题,并且对该系统的引用(例如指针存在)仍然存在。



您可以请求GC运行,这不被认为是邪恶的。虽然最好不要求GC运行。
Read about the heap space[^]

Read about Garbage Collector[^]

If your app does not have "surviving pojos", then the heap''s Survivor Space is not used.
Survivors are a typical problem when using JNI to connect to some C Coding and a reference to that system (e.g. a pointer there) is held.

You can request the GC to run, that is not considered to be that evil. Although it''s best to not need to request the GC to run.


这篇关于Survivor Space未在JVM中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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