kirancodes.me
To Proof Maintenance & Beyond!

Predicting Compilation Resources for Adaptive Build in an Industrial Setting

Junhao Hu, Chaozheng Wang, Hailiang Huang, Huang Luo, Yu Jin, Yuetang Deng, Tao Xie

Abstract

Development teams in large companies often maintain a huge codebase whose build time can be painfully long in a single machine. To reduce the build time, tools such as Bazel and distcc are used to build the code base in a distributed way. However, in the process of distributed build, certain remote slave machines can crash due to two types of errors: Out Of Memory (OOM) and Deadline Exceeded (DE) errors. These crashes lead to time-consuming rebuilds, as suffered by the WeiXin Group (WXG) of Tencent Inc. (the vendor of WeChat, a highly popular mobile app in China). Aiming to prevent these two types of errors, in this paper, we propose a new approach named PCRLINEAR, which predicts the memory and time requirements of the given C++ file, allowing the underlying distributed build system to schedule compilation resources adaptively according to the prediction results. Our experiments show that PCRLINEAR reduces the number of OOM and DE errors from 5% to 0.2% and, at the same time, achieves substantial build-performance improvement of 30% on average.

BibTeX
@inproceedings{Hu-al:ASE23,
  author    = {Junhao Hu and
               Chaozheng Wang and
               Hailiang Huang and
               Huang Luo and
               Yu Jin and
               Yuetang Deng and
               Tao Xie},
  title     = {Predicting Compilation Resources for Adaptive Build in an Industrial Setting},
  booktitle = {ASE},
  pages     = {1808--1813},
  publisher = {{IEEE}},
  year      = {2023},
}

Related papers