Binary optimizer: Facebook’s Bolt significantly speeds up the Linux kernel
September 28, 2021Even after the compilation process, Facebook can further optimize binaries with the Bolt tool. This pays off for the Linux kernel.
Facebook’s development department is apparently also successfully using the tool Bolt, which it created itself, for the Linux kernel. This emerged from a presentation by Maksim Panchenko at this year’s Linux Plumbers Conf. Bolt is a so-called post-link-time optimizer, i.e. a tool that further optimizes binary files already created during the compilation process. The name stands for Binary Optimization and Layout Tool.
Panchenko compares the abilities and above all results of Bolt in his lecture thereby above all with well-known compiler optimizers such as Profile Guided Optimization (PGO) and Link-Time Optimization (LTO). In addition to these, the binaries could be further massively accelerated. Facebook even speaks of “acceleration in the double-digit range” here.
For the use of Bolt in connection with the Linux kernel, however, there are also some problems, which is probably mainly due to the structure and functionality of the kernel itself. This includes code that can change itself at runtime. In addition, there are problems such as exception handling, which cannot be easily implemented with Bolt.
Further details about Bolt can be found in the presentation as well as in the project’s open source code on Github. That ideas like Bolt can be a desirable extra effort when creating binaries is proven not only by Facebook’s work, but also by Google’s work on a similar idea. Based on experiments with Bolt, Google has therefore created the Propeller framework for the compiler construction kit LLVM, which was ultimately incorporated into the main branch.