Show Your Support: Did you know that the hundreds of articles written on Phoronix each month are mostly authored by one individual? Phoronix.com doesn't have a whole news room with unlimited resources and relies upon people reading our content without blocking ads and alternatively by people subscribing to Phoronix Premium for our ad-free service with other extra features.
Facebook's BOLT Nearing Mainline LLVM For Optimizing Binaries
BOLT has been an engineering project at Facebook going back years that is a Binary Optimization and Layout Tool for speeding up Linux binaries. It aims to optimize the speed of large applications based on a collected execution profile, generated via Linux perf or similar, by improving the code layout for greater efficiency.
BOLT leverages LLVM and for the past year Facebook engineers have been wanting to upstream this optimizer inside LLVM. Generally BOLT'ing an application can net a several percentage point improvement to performance while in some cases can even be double digit improvements. BOLT is complementary to the likes of a compiler's LTO and PGO (Profile Guided) optimizations but like PGO does require first collecting a profile on the binary to be optimized.
BOLT is designed to work with large and complex applications/services. BOLT is already in use for large, production workloads within Facebook for squeezing out greater performance. In a 2019 paper they reported a 7% performance speed-up for their data-center applications on top of the gains already achieved by feedback-directed optimizations (FDO) and LTO. In some cases can even speed up binaries by ~20% or up to 50% if not using FDO/LTO.
What's going on now is nearing the point of BOLT being added to LLVM's source tree in the form of its mono repository. This mailing list thread was started to work through remaining technicalities and ensuring no other outstanding issues remain before it's ultimately merged. It's looking soon like the landing of BOLT within the LLVM repository will happen. Facebook hopes that having BOLT upstream will encourage more contributions to this tool. Currently BOLT does not work on Windows.
BOLT benchmarks coming up soon on Phoronix.