Profile
Profile 是最重要的第一环。
- 利用好 spark UI 和 yarn container log
- 分析业务代码,对其计算代价进行预判
- 建设基准,进行对比,比如application id 进行对比,精确到 job DAG 环节
充分利用 UI
Stage 页面
页头 summary,也很重要。
勾选所有 UI metrics,提供判断依据

task 维度 metrics


Executor 维度

application id 对比
如果两个application id, shuflfle read/write 差不多,input/output 差不多。
慢的那一个,如果内存消耗大,那说明计算量大,比如 sum, count 等
Executor 页面
选中所有 metrics,增加判断依据
注意GC