Google Research

Propeller: A Profile Guided, Relinking Optimizer for Warehouse Scale Applications

NA (2023)

Abstract

While profile guided optimizations (PGO) and link time op-timizations (LTO) have been widely adopted, post link optimizations (PLO) have languished until recently when re-searchers demonstrated that late injection of profiles can yield significant improvements. However, the disassembly-driven, monolithic design of post link optimizers face scalingchallenges with large binaries and is at odds with distributed build systems. To reconcile and enable post link optimizations within a distributed build environment, we propose Pro-peller, a relinking optimizer for warehouse scale workloads.To enable flexible code layout optimizations, we introduce basic block sections, a novel linker abstraction. Propeller uses basic block sections to enable a new approach to PLO without disassembly. Propeller achieves scalability by relinking the binary using precise profiles instead of rewriting thebinary. The overhead of relinking is lowered by caching and leveraging distributed compiler actions during code generation.Propeller has been deployed to production at Google withover 10M+ cores executing Propeller optimized code at anytime. An evaluation of internal warehouse scale applications show Propeller improves performance by 1.1% to 8% beyond PGO and ThinLTO. Compiler tools such as clang improve by10% while MySQL improves by 8% respectively. Comparedto the state of the art binary optimizer, Propeller achieves comparable performance while lowering memory overheads by 30%-70% on large benchmarks

Learn more about how we do research

We maintain a portfolio of research projects, providing individuals and teams the freedom to emphasize specific types of work