读书人

【阅览笔记】jvm性能工具-jstat解决10

发布时间: 2012-10-27 10:42:26 作者: rapoo

【阅读笔记】jvm性能工具-jstat解决100%CPU占用率分析

阅读文章:http://www.theserverside.com/news/thread.tss?thread_id=61915

?

原文内容:

?

the last is jstat -gc output:

S0C??? S1C??? S0U??? S1U????? EC?????? EU??????? OC???????? OU?????? PC???? PU??? YGC???? YGCT??? FGC??? FGCT???? GCT
64.0?? 64.0?? 0.0??? 0.0?? 332992.0?? 0.0???? 666304.0?? 73192.5?? 83968.0 83967.9?? 6893?? 17.576 6882? 2705.923 2723.499

Before you read further, take a look at this and see if you can tell what the problem is...

Now for the solution. Kirk Pepperdine said this:

YGC (Young gen count) is 6893 and FGCT is 6882 which is a completely ridiculous full GC to GC ratio. As for the times, YGCT is 17.56 where as FGCT is 2705.923 giving a 99.9% Full GC to GC ratio. A normal FGC:GC ratio should be less than 5% and less than 1% is desirable.

Second observation
PC is perm gen configured @ 83968 and PU perm gen used at 83967.9
Diagnosis: Frequent Full GC's due to Perm Gen being full.
Solution: Increase the size of perm gen using -XX:MaxPermSize.

笔记:

这里原作者提到一位性能分析专家的观点,有这么几点适合我们平时分析问题时借鉴的——

1、FGC和GC(这个GC是指FGC+YGC的总和)的比值应该在1%~5%左右,也就是说完全GC应该只占到普通GC的5%以下,不然就是完全GC过度频繁了;

2、从PC和PU两个指标容易看出PERM SIZE设置也不尽合理,当然除了原作者提到的增大PermSize之外,我们也应该审视一下,这么大的PC值到底是因为什么原因增大到了这个程度。

?

后话:

详细翻查了一下官方的文档:http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html

?

有如下指标说明:

?

PC ? ? ?Current permanent space capacity (KB).

PU ? ? ?Permanent space utilization (KB).

YGC ? Number of young generation GC Events.

YGCT Young generation garbage collection time.

FGC ? ?Number of full GC events.

FGCT ?Full garbage collection time.

GCT ? ?Total garbage collection time.

?

?

读书人网 >JavaScript

热点推荐