[Beowulf] Facebook open sources BOLT for reordering code in binaries
Chris Samuel
chris at csamuel.org
Wed Jun 20 03:08:12 PDT 2018
Hi all,
Just came across this on the Easybuild Slack.
https://code.facebook.com/posts/605721433136474/accelerate-large-scale-applications-with-bolt/
# Highly complex services, such as those here at Facebook, have large source
# code bases in order to deliver a wide range of features and functionality.
# Even after the machine code for one of these services is compiled, it can
# range from 10s to 100s of megabytes in size, which is often too large to
# fit in any modern CPU instruction cache. As a result, the hardware spends a
# considerable amount of processing time - nearly 30 percent, in many cases -
# getting an instruction stream from memory to the CPU. To address this
# issue, which is commonly known as instruction starvation, we have developed
# and deployed BOLT, a binary optimization and layout tool. BOLT optimizes
# placement of instructions in memory, thereby reducing CPU execution time by
# 2 percent to 15 percent. Unlike previous tools to address instruction
# starvation, BOLT works with applications built by any compiler, including
# GCC or Clang.
It uses "perf record" to gather its profiling information (so you don't need to
compile it with profiling libs) and if you add --emit-relocs to your link flags
it can do function reordering too.
More information (and the code) on Github:
https://github.com/facebookincubator/BOLT
Have fun!
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
More information about the Beowulf
mailing list