美文网首页
GC 日志格式官方解释

GC 日志格式官方解释

作者: 爱蛇 | 来源:发表于2019-03-08 16:30 被阅读0次

原文:
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/generations.html#sthref16

以下是文中提到JDK1.8 的GC日志格式解释

 ## Measurement

Throughput and footprint are best measured using metrics particular to the application. For example, the throughput of a web server may be tested using a client load generator, whereas the footprint of the server may be measured on the Solaris operating system using the `pmap` command. However, pauses due to garbage collection are easily estimated by inspecting the diagnostic output of the virtual machine itself.

The command-line option `-verbose:gc` causes information about the heap and garbage collection to be printed at each collection. For example, here is output from a large server application:

[GC 325407K->83000K(776768K), 0.2300771 secs]
[GC 325816K->83372K(776768K), 0.2454258 secs]
[Full GC 267628K->83769K(776768K), 1.8479984 secs]


The output shows two minor collections followed by one major collection. The numbers before and after the arrow (for example, `325407K->83000K` from the first line) indicate the combined size of live objects before and after garbage collection, respectively. After minor collections, the size includes some objects that are garbage (no longer alive) but cannot be reclaimed. These objects are either contained in the tenured generation or referenced from the tenured generation.

The next number in parentheses (for example, `(776768K)` again from the first line) is the committed size of the heap: the amount of space usable for Java objects without requesting more memory from the operating system. Note that this number only includes one of the survivor spaces. Except during a garbage collection, only one survivor space will be used at any given time to store objects.

The last item on the line (for example, `0.2300771 secs`) indicates the time taken to perform the collection, which is in this case approximately a quarter of a second.

The format for the major collection in the third line is similar.

相关文章

  • GC 日志格式官方解释

    原文:https://docs.oracle.com/javase/8/docs/technotes/guides...

  • JVM GC 日志详解

    JVM GC 日志详解 本文采用的JDK版本: 一、GC 日志参数 设置JVM GC格式日志的主要参数包括如下8个...

  • Java GC 日志详解(一图读懂)

    Java GC日志可以通过 +PrintGCDetails开启 以ParallelGC为例 YoungGC日志解释...

  • GC 日志格式

    随机截取一段GC日志 55442.859是从JVM启动以来经历的秒数,可以认为是发生GC的相对时间。GC表示是否暂...

  • JVM GC 日志详解

    本文采用的JDK版本: 一、GC 日志参数 设置JVM GC格式日志的主要参数包括如下8个: 本文假设读者已经熟悉...

  • 通过 gc.log 调优 JVM

    一、GC 日志查看 GC 日志默认是关闭的,需要查看 GC 日志首先需要开启 GC 日志。 常用 GC 日志的配置...

  • go gc 分析

    1 先翻译一下runtime 文档中,关于gc的内容(里面涉及GC日志格式) ···原文: https://gol...

  • JVM - GC日志

    JVM - GC日志 -XX:+PrintGC 输出GC日志 -XX:+PrintGCDetails 输出GC的详...

  • Java GC日志分析

    1. 查看GC日志准备 2. 年轻代GC日志 3. CMS GC日志 4. CMS GC 7阶段解析 1.初始标记...

  • GC日志查看和分析

    GC日志查看和分析 GC日志查看 可以通过在java命令种加入参数来指定对应的gc类型,打印gc日志信息并输出至文...

网友评论

      本文标题:GC 日志格式官方解释

      本文链接:https://www.haomeiwen.com/subject/grarpqtx.html