tomcat启动许多gc,Tomcat GC日志语句的说明

Here is a statement from my catalina.out, generated by my tomcat server :

1885.855: [GC [PSYoungGen: 742996K->64359K(761472K)] 2509583K->1832973K(4116928K), 0.1453610 secs] [Times: user=0.31 sys=0.00, real=0.14 secs]

Could someone explain the meaning of various numbers in here?

解决方案

The break-up of the line is as followd:

1885.85 - this in seconds is the amount of time the JVM has been running, so around 31 minutes or so in your case at which point the GC took place.

[GC - states a GC occured at this point in time. This is a Partial GC, sometimes it will show Full GC

Now, the Total Heap available for the JVM = Young + Old

[PSYoungGen:742996K->64359K(761472K) - represents the Parallel Scavenging Collector in the Young generation (which is one of the many types of GC collectors available in the JVM).

The memory freed by GC is always of the pattern

x->y(z)

x is the initial memory before GC, y is

the memory after GC, z is the total

memory allowed for that area in the

JVM

so in your example,

742996K->64359K(761472K) - the total Young size is 761Mb, and when it reached 742 Mb a collection took place, and it cleared down to 64.3Mb

i.e. it cleared up 678 Mb

2509583K->1832973K(4116928K)

Here the total heap memory is represented.

So out of a total possible heap of 4.1 Gb, when the GC took place, it had filled 2.5 Gb and it has come down to 1.83 Gb - again the same 678 Mb is what got cleared.

0.1453610 secs]

This entire operation took 0.1453610 seconds

[Times: user=0.31 sys=0.00, real=0.14 secs]

shows the break-up of user, system and real times taken.

This is just one line - you would be looking for a pattern esp one that says Full GC in it

And use a log analyzer like GCViewer for showing you throughput and other good stuff.

Also read the docs from Sun to get the basics.

Further reading:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值