drvonr6573 2017-02-22 00:52
浏览 48
已采纳

读取Go gctrace输出

I have gctrace output that looks like this:

gc 6 @48.155s 15%: 0.093+12360+0.32 ms clock, 0.18+7720/21356/3615+0.65 ms cpu, 11039->13278->6876 MB, 14183 MB goal, 8 P

I am not sure how to read the CPU times in particular. I understand that it is broken down into three phases (STW sweep termination, concurrent mark/scan, and STW mark termination), but I'm not sure what the + signs mean (i.e. 0.18+7720 and 3615+0.65). What do these + signs signify?

  • 写回答

1条回答 默认 最新

  • dqssst0144 2017-02-22 02:25
    关注

    In your case, they look like assist and termination times;

    // CPU time
    0.18    : **STW** Sweep termination.
    7720ms  : Mark/Scan - Assist Time (GC performed in line with allocation).
    21356ms : Mark/Scan - Background GC time.
    3615ms  : Mark/Scan - Idle GC time.
    0.65ms  : **STW** Mark termination.
    

    I think it changes (or it may) over various Go versions and you can find more detailed info at runtime package docs.

    Currently, it is:
        gc # @#s #%: #+#+# ms clock, #+#/#/#+# ms cpu, #->#-># MB, # MB goal, # P
    where the fields are as follows:
        gc #        the GC number, incremented at each GC
        @#s         time in seconds since program start
        #%          percentage of time spent in GC since program start
        #+...+#     wall-clock/CPU times for the phases of the GC
        #->#-># MB  heap size at GC start, at GC end, and live heap
        # MB goal   goal heap size
        # P         number of processors used
    

    Example here

    See also Interpreting GC trace output

    gc 6 @48.155s 15%: 0.093+12360+0.32 ms clock,
    0.18+7720/21356/3615+0.65 ms cpu, 11039->13278->6876 MB, 14183 MB goal, 8 P
    
    • gc 6
    • @48.155s since program start
    • 15%: of time spent in GC since program start
    • 0.093+12360+0.32 ms clock stop-the-world (STW) sweep termination + concurrent mark and scan + and STW mark termination
    • 0.18+7720/21356/3615+0.65 ms cpu (GC performed in line with allocation), background GC time, and idle GC time
    • 11039->13278->6876 MB heap size at GC start, at GC end, and live heap
    • 8 P number of processors used
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配