FileVault Performance

With Lion sporting a more usable version of FileVault I was curious about its performance impact. I'd enabled FileVault on my personal machine and subjectively felt a performance impact, but I needed to quantify it. I put together a number of tests to do just that.

For all of these tests my test platform is a 15-inch MacBook Pro with a 2.2GHz Sandy Bridge Core i7 from early 2011 with an Apple branded 256GB SSD. In these tests I was primarily concerned with two things: how performance is affected, and what sort of extra load FileVault encryption places on the CPU.

Our first test is a simple file copy. I've got a directory of 2200MB worth of RAW files from a Nikon D700. I copy the folder from the SSD to the same SSD and report performance in MB/s:

FileVault Performance - 2200MB File Copy (MB/s)

With FileVault enabled we take a 24% performance hit, hardly insignificant. Average CPU utilization during the file transfer actually dropped with FileVault enabled from 8.5% to 4.5%. I suspect the reason for the drop was the slower overall transfer rate. It would appear that FileVault, at least on a quad-core Sandy Bridge CPU has absolutely no overhead here. Given that Apple near-universally uses AES for symmetrical encryption, it's reasonable to assume here that FileVault is taking advantage of the AES-NI instructions on Intel's Core-i series of processors.

Our next test tested one of Lion's new features: threaded conversations in Mail. We timed how long it took to launch Mail and open a single email thread with 42 replies. If you've used OS X Mail in the past you'll know that CPU utilization goes insane if you're working on a thread with dozens of replies. The same is definitely true for threaded conversations in Lion.

FileVault Performance - Open 42 Reply Email Thread - Time in Seconds

Thanks to the MacBook Pro's SSD both setups complete this task pretty quickly. There is a penalty associated with FileVault though - around 9% in this case. Peak CPU utilization was similar on both systems, 100% of four threads on the eight thread Core i7.

I grabbed a screenshot of the CPU utilization graph in Activity Monitor during this test for both setups:


CPU Utilization: No Encryption (left) vs. FileVault Enabled (right)

While the two vary slightly, you can see that overall CPU utilization appears to be similar regardless of whether or not encryption is enabled.

Our third test is actually one of our standard OS X CPU benchmarks - we time the import of 203 RAW images into iPhoto. This task is impacted by both CPU and I/O performance:

FileVault Performance - iPhoto Import - Pictures per Minute

Despite the I/O dependency, there's virtually no performance impact to enabling FileVault here.

Our final tests are raw I/O tests using Quickbench. I focused on 4KB and 8KB random read/write since those are the most common transfer sizes for random file access. And for sequential operations I focused on 128KB transfers, again optimizing for common sizes.

FileVault Performance - Quickbench 4KB Random Read (MB/s)

FileVault Performance - Quickbench 4KB Random Write (MB/s)

FileVault Performance - Quickbench 8KB Random Read (MB/s)

FileVault Performance - Quickbench 8KB Random Write (MB/s)

FileVault Performance - Quickbench 128KB Sequential Read (MB/s)

FileVault Performance - Quickbench 128KB Sequential Write (MB/s)

Overall the hit on pure I/O performance is in the 20 - 30% range. It's noticeable but not big enough to outweigh the benefits of full disk encryption. Note that under OS X there's still no way to take advantage of SSD controllers with FDE like the SF-1000/2000 series and the Intel SSD 320.

FileVault Safari, iChat, TextEdit, Preview, QuickTime X
Comments Locked

106 Comments

View All Comments

  • VMFnet - Friday, July 22, 2011 - link

    I just installed Lion on a OCZ Vertex2 SSD and it still doesn't support TRIM. I guess support for this feature is limited to stock Apple SSDs only.
  • Sapan - Friday, July 22, 2011 - link

    Thanks for the reply. It is a shame that there still is no TRIM support.

    In the mean time I would recommend checking out a 3rd party program called TRIM Enabler:
    http://www.groths.org/?page_id=322

    Though the program is designed for Snow Leopard it works for Lion, but they are making a new version for Lion.
  • mdlam - Friday, July 22, 2011 - link

    I love how these diehard Apple fans are trying to resolve their discomforting feelings of exorbitant expenditure to Apple by

    A: Unreasonably denigrating other competitive alternatives.
    B: Exaggerating the usefulness of certain proprietary tools.
    C: Empathizing with the company's goals/missions/values

    All to resolve the realization that they are paying more money than what they are getting, which is...

    A totally outdated OS made to look streamline
    A pretty cool looking computer that uses tunnel fans (which are extremely loud) and likes to overheat.
    I used Snow Leopard on my Mac Mini for about 2 months and hated it. I think people force themselves to like OSX just because their laptop looks cool.
    Horrible graphics speeds. Their BEST video card that you can fit into a their $4500 Mac Pro, is a ATI 6500 series, which is like a 100 dollar card, and offers pathetic performance for gaming--I had a 6950 2gb and that was barely enough. You can argue that Mac pro's should be used for graphics design and other things and not gaming. If that's the case I don't see why they don't put a FireGL or other designer cards in. In any case, who buys a $4500 computer that comes with a bullcrap video card? Some people are IDIOTS.
  • mdlam - Friday, July 22, 2011 - link

    Edit: A $170 dollar video card, 6870 1gb...Which is a complete piece of garbage card that is 30% slower than the 5970 1gb. Guess how much the upgrade is? $200.

    Post is based off of cognitive dissonance theory
  • parlour - Monday, July 25, 2011 - link

    Macs don’t seem to be the right choice for you. That’s alright. Just don’t claim that everyone else has the same needs as you.
  • sjinsjca - Saturday, July 23, 2011 - link

    The test with the SSD is intriguing but there's a possibility that the FileVault performance hit might be less in the case of a conventional hard disk.

    Reason: hard disks are slower than SSDs, so there would be more idle states in which the OS could be performing encryption/decryption tasks.

    Worth a spot-check.
  • EnerJi - Sunday, July 24, 2011 - link

    That's a great point. I'd also love to know if the performance impact decreases with an HDD.
  • johnmacward - Tuesday, July 26, 2011 - link

    What annoys me is the fact that the recovery partition doesn't keep a copy of the Lion installer for instant re-installation - and with a bit of Apple magic even a copy that updates as the OS updates.

    A download each time is a possibly expensive prospect considering we all have data caps of some kind.

    It also turns a reinstall into a shockingly long 4 hour job which is a major pain.
  • luca108 - Tuesday, July 26, 2011 - link

    Small detail, but in the review you said you could only launch Launchpad by clicking the dock icon or using spotlight, but you can also set it as a hot corner. This is what I personally do... top left corner set for Launchpad and I can quickly get in and out of it to find my apps and utilities.

    I'm not suggesting it's quicker than using an apps stack on the dock... actually, its the exact same. But it definitely is faster than clicking the Launchpad dock icon or using spotlight to launch it.
  • Thrakazog - Tuesday, July 26, 2011 - link

    Does anyone know if Lion extended trim support to 3rd party SSD's, instead of only the ones apple provides ?

Log in

Don't have an account? Sign up now