Testing for the FileVault compilation penalty

Enabling drive encryption seems like a good idea, but I've always wondered how much overhead the encryption adds to compile times. Since compilation speed is rather important to me I setup a semi-scientific experiment to measure before and after enabling FileVault.

The methodology for this test, before and after enabling FileVault, with both the kinja-core and kinja-mantle codebases:

  • Reboot
  • > time play-2.1.5 clean dist # 3 or more times

The machine was rebooted between iterations because the drive and operating system caches will cause the first build time to be longer. Subsequent execution times should converge.

Advertisement

Enough of the boring stuff, lets see some results.

As the graphs show, there wasn't much difference. My conclusion is that for this computer on these code bases, there is no penalty for using FileVault.

Advertisement

I don't think this is a slam dunk to say that FileVault doesn't slow down a build though. Unfortunately, our current build setup does not parallelize as well as it could, so my computer is largely idle while building. I'm guessing that the encryption overhead is shifted to underutilized CPU cores, and the net result is that I'm not able to measure a difference in build times. A more heavily utilized machine, I'm guessing, would probably expose this penalty.

About this test:

Computer: MacBookPro10,1 (Intel Core i7 2.8GHz with 16GB of ram)

OS: OSX 10.8.5

Code base: ~45k lines of Scala (sloc output: https://gist.github.com/JeremyChase/b9… )

Advertisement

Raw data:

Share This Story