java CMS gc log中的'real','user'和'sys'是什么意思? [英] What do 'real', 'user' and 'sys' mean in the java CMS gc log?

查看:271
本文介绍了java CMS gc log中的'real','user'和'sys'是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于以下Java版本:



OpenJDK版本1.6.0

OpenJDK运行时环境(版本1.6.0-b23)<
OpenJDK 64位服务器虚拟机(构建20.0-b11,混合模式)



使用以下GC标记:



-verbose:gc

-XX:+ UseConcMarkSweepGC

-XX:+ CMSClassUnloadingEnabled

-XX:+ PrintGCDetails

-XX:+ PrintGCDateStamps



我们得到如下的日志行:


2012-11-09T16:46:53.438-0100:[CMS-concurrent-mark:4.039 / 4.060 secs]
[Times:user = 4.09 sys = 35.05,real = 4.06 secs ]


最初的4.039 / 4.060秒应该根据 https://blogs.oracle.com/poonam/entry/understanding_cms_gc_logs 表示并发标记占用cpu时间总计4.039秒和挂起时间4.060秒(包括屈服于其他线程也) 。

但是用户,sys和真实值在这里意味着什么?

解决方案


  1. 系统和用户只是CPU时间。因此,它们不包括进程被CPU阻塞或进行I / O等的时间。


  2. GC时间通常应该类似于sys +用户时间,但如果进程被阻止或等待,则会更高。这对于串行收集器和单个处理器盒来说是真实的。但是,在多处理器环境中(使用并行收集器),由于有多个CPU,所以GC时间将小于sys +用户时间。

  3. 真正的时间与GC时间相似。


For the following Java version:

OpenJDK version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b23)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

With the folllowing GC flags:

-verbose:gc
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps

We get log lines like:

2012-11-09T16:46:53.438-0100: [CMS-concurrent-mark: 4.039/4.060 secs] [Times: user=4.09 sys=35.05, real=4.06 secs]

The initial "4.039/4.060 secs" should according to https://blogs.oracle.com/poonam/entry/understanding_cms_gc_logs mean that concurrent marking took total 4.039 seconds cpu time and 4.060 seconds wall time (that includes the yield to other threads also).

But what do the user, sys and real values mean here?

解决方案

  1. The sys and user are CPU times exclusively. Consequently they do not include the time that the process is blocked for CPU or is doing I/O etc.

  2. The GC time should generally be similar to the sys+user time but if the process is blocked or waiting then it would be higher. This would be true for a serial collector and a single processor box. However, in the multiprocessor environments (with parallel collectors), the GC time would be lesser than the sys+user time since there are multiple CPUs.

  3. The real time would be similar to the GC time.

这篇关于java CMS gc log中的'real','user'和'sys'是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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