0

我正在尝试使用

conf.setBoolean("mapred.task.profile", true);
conf.set("mapred.task.profile.params", "-agentlib:hprof=cpu=samples,heap=sites,depth=6,force=n,thread=y,verbose=n,file=%s");
conf.set("mapred.task.profile.maps", "0-1");
conf.set("mapred.task.profile.reduces", "0-1");

正如预期的那样,我生成了 4 个配置文件:

     2849 Mar 25 15:30 attempt_201402231438_11879_m_000000_0.profile
  8786788 Mar 25 15:30 attempt_201402231438_11879_m_000001_0.profile
  4129237 Mar 25 15:31 attempt_201402231438_11879_r_000000_0.profile
 12644892 Mar 25 15:32 attempt_201402231438_11879_r_000001_0.profile

(文件_m_在mapper任务分析_r_期间生成,在reduce任务分析期间生成)

attempt_201402231438_11879_m_000001_0.profile看起来不错:

THREAD START (obj=50000161, id = 200001, name="main", group="main")
THREAD START (obj=500021bd, id = 200004, name="TGT Renewer for yampolsy", group="main")
THREAD END (id = 200004)
...
TRACE 300000: (thread=200001)
        <empty>
TRACE 300001: (thread=200001)
        java.lang.Thread.<init>(Thread.java:493)
TRACE 300002: (thread=200001)
        java.lang.Thread.<init>(Thread.java:206)
...
SITES BEGIN (ordered by live bytes) Tue Mar 25 15:30:45 2014
          percent          live          alloc'ed  stack class
 rank   self  accum     bytes objs     bytes  objs trace name
    1 35.41% 35.41%  99614736    1  99614736     1 317704 byte[]
    2 16.79% 52.20%  47232000 2880 125952000  7680 318394 char[]
...
SITES END
CPU SAMPLES BEGIN (total = 6089) Tue Mar 25 15:30:45 2014
rank   self  accum   count trace method
...
 859  0.02% 99.57%       1 319489 java.lang.System.arraycopy
 860  0.02% 99.59%       1 319490 java.lang.Object.<init>
CPU SAMPLES END

奇迹开始后:

  1. attempt_201402231438_11879_m_000000_0.profile仅包含标准标题(无配置文件信息)。我不太关心这个文件,因为我的主要兴趣是减速器,但这感觉不对
  2. attempt_201402231438_11879_r_000000_0.profileattempt_201402231438_11879_r_000001_0.profile包含线程和跟踪信息,但不包括CPU SAMPLESSITES信息。

作业成功完成。

知道会出什么问题吗?

为什么我没有得到减速器的CPU 样本?

有没有人遇到过同样的问题?

4

0 回答 0