FileVault 2 SSD Performance?

Discussion in 'Mac OS X Lion (10.7)' started by Farthen, Jul 2, 2011.

  1. Farthen macrumors member

    Joined:
    Feb 3, 2009
    Location:
    Germany
    #1
    Is there any noticeable slowdown when using FileVault 2 in combination with a solid state startup drive? I wonder if I should turn it on after installing Lion but I don't want disk I/O to suffer from that. Anyone did any performance tests?
     
  2. LinMac macrumors 65816

    Joined:
    Oct 28, 2007
    #2
    My SSD is about 50MB/sec slower using Filevault 2, but that is expected due to the encryption.
     
  3. Farthen thread starter macrumors member

    Joined:
    Feb 3, 2009
    Location:
    Germany
    #3
    Why exactly is it expected? And where is the bottleneck? The CPU?

    The only difference of encrypted vs not encrypted should be that encrypted data has to be piped through the CPU for decryption, right? So given a CPU that is capable of managing to decrypt the constant stream of data at the maximum speed of the SSD we shouldn't have any slowdowns?
     
  4. CyBeRino macrumors 6502a

    Joined:
    Jun 18, 2011
    #4
    How much slower it is depends on a couple of things.

    First, if you have a CPU that supports AES-NI, OSX should use that (I believe it does, at least) and the CPU bit won't be slowing anything down.

    Second: some SSD drives such as those based on Sandforce chips actually compress data before writing it to NAND. (Interestingly, they also encrypt it before doing so but OSX does not use that capability, so a filevault system's data is actually encrypted twice before going to NAND) This means that it's usually writing less data to NAND than you're feeding it, so it appears to be writing faster than it actually is. It has the added effect of making your NAND last longer because it is used less.

    This does mean, though, that write performance on non-compressable data is less than compressable data. AES-encrypted data is, almost by definition, non-compressable because data that has been encrypted with a good algorithm is indistinguishable from random data.

    So if you have a drive with a controller that gets its high write performance by compressing data, you'll find it's a bit slower with Filevault. Read performance also suffers slightly due to the same effect, but less so.

    An SSD that does not compress data should be limited only by how fast your CPU can encrypt and decrypt the data.
     
  5. Farthen thread starter macrumors member

    Joined:
    Feb 3, 2009
    Location:
    Germany
    #5
    Ok, thanks. I will probably try it out to see the overhead myself. As my SSD (Apple branded Toshiba SSD) does not compress data and my CPU should definitely be fast enough (i7-2600) I don't expect any major slowdown except for a little more CPU usage.
     
  6. LinMac macrumors 65816

    Joined:
    Oct 28, 2007
    #6
    There is nothing that suggests Lion uses AES-NI in Filevault. So far the performance drops using a stock Apple SSD have been more or less consistent with the drops expected from encryption.

    Just to note, my Macbook Pro uses a Core i7 so it supports AES-NI.
     
  7. sth macrumors 6502a

    Joined:
    Aug 9, 2006
    Location:
    The old world
    #7
    Believe me, there is. ;)
     
  8. kev1234 macrumors member

    Joined:
    Jul 11, 2011
    #8
    so if I active it Filevault 2 on the new MacBook Air, with 1.8GHz Core i7, 256gb SSD and 4GB of ram.... I shouldn't notice the slowdown... right ? meaning that the computer will work as fast as it wouldn't be using filevault 2 ? ! .... is that right ????? and if there is a slowdown it would it be very low ????
     
  9. sth macrumors 6502a

    Joined:
    Aug 9, 2006
    Location:
    The old world
    #9
    Correct. The slowdown should be unnoticable in daily use.

    And in case you don't like it: You can always turn it off later.
     
  10. Mr. Retrofire, Jul 25, 2011
    Last edited: Jul 25, 2011
  11. andreiru macrumors 6502

    andreiru

    Joined:
    Apr 18, 2008
    Location:
    Kurgan, RF
    #11
    Having asked the same question, I've just read on a OWC blog that if an SSD has its own encryption - OWC SSD reportedly does, then their preliminary test results are that with FileVault 2 enabled write speeds are halved, while read speeds remain unaffected.
     
  12. KPOM macrumors G5

    Joined:
    Oct 23, 2010
    #12
    I have not noticed any difference in read and write speeds on my 11" i7 Air vs my 2010 11" model. Perhaps the boost in CPU and the extra speed of the Samsung vs. the Toshiba offset the effect of encryption, but to me if there is any performance impact it's well worth it for the security.
     
  13. CyBeRino macrumors 6502a

    Joined:
    Jun 18, 2011
    #13
    This does not relate to the encryption at all. I believe most SSDs encrypt before writing to NAND. It just means it has to encrypt a block of pre-encrypted data. This does not make the process faster or slower.

    The reason OWCs speeds are halved is because they use Sandforce controllers, which I wrote about in a post above.
     
  14. jaydisc macrumors newbie

    Joined:
    Jul 3, 2003
  15. ArmanUV macrumors member

    Joined:
    Jul 15, 2010
    #15
    I hate to bring up this topic but my experience with FileVault 2 + SandForce SSD is a huge no no.
    I have an OWC Electra 6G inside my 2011 15" 2.2Ghz MBP, Which supports AES-NI, but the benchmarks I took showed read AND write speeds around 80MB/s. I contacted OWC's tech support and they blamed it on the MBP. I RMAed the MBP back to Apple and got a replacement. Needless to say, the same speeds were repeated in the benchmarks. I finally convinced OWC to send me a replacement SSD. I cloned my Lion partition from my external HD to the new SSD and again I saw no speed improvements.
    The OWC technician that was handling my case then told me that they have tested the SSD that I sent them and there is absolutely nothing wrong it. At this point, it was obviously that the issue was software-related. I wiped the SSD clean and reinstalled Lion, and this time I disabled FileVault. A few days later, enough for the Sandforce to stop throttling the speeds, the problem was solved.

    It also makes sense if you think about it. Encrypted data is not compressible by the Sandforce Controller. To avoid excessive wear and tear and increase the life of the SSD, the controller throttles the speeds. After disabling FileVault, it takes a few days for the controller to recover the unused NAND memory and to stop limiting the speeds.
     
  16. swixo macrumors newbie

    Joined:
    Jun 7, 2011
    #16
    FV2 is in use on all of my macs, and performance is not impacted much at all. The SSD on my air seems as fast as before.

    s
     
  17. swixo macrumors newbie

    Joined:
    Jun 7, 2011
    #17
    Smartest thing anyone has said today.

    s
     
  18. jaydisc macrumors newbie

    Joined:
    Jul 3, 2003
    #18
    My understanding is that any underlying controller that is trying to compress your encrypted data is going to have a hard time.
     
  19. ArmanUV macrumors member

    Joined:
    Jul 15, 2010
    #19
    I didn't notice that much of an overall performance hit using my mac when Filevault was on. However, the benchmarks told a different story. That's probably because the overall snappiness of applications and the OS is not dependant of the sequential read/write, but mostly on small 4K read and writes. What did took a performance hit in my case was sequential read and write speeds (from 480MBps to around 80MBps)
     
  20. GermanyChris macrumors 601

    GermanyChris

    Joined:
    Jul 3, 2011
    Location:
    Here
  21. haravikk macrumors 65816

    Joined:
    May 1, 2005
    #21
    Does this mean that enabling FileVault 2 would have a larger than normal impact on an SSD's capacity? Or is the compression only occurring while data is passed around within the device itself?

    It seems strange that SSD's would bother to encrypt their data, as unless you've provided a key for doing this with then surely the data is all readable anyway?

    In an ideal world FileVault 2 encryption shouldn't add anything except a few cycles of latency (not enough to notice), but anything that relies on compression for speed is definitely going to be affected, since any encryption algorithm that gives more than a couple of % worth of compression performance isn't doing its job properly :)
     
  22. sth macrumors 6502a

    Joined:
    Aug 9, 2006
    Location:
    The old world
    #22
    No.

    Yes.
     
  23. Claywd macrumors newbie

    Joined:
    Nov 9, 2012
    #23
    For all who happen upon this threat looking for new info

    I just finished turning off Filevault 2. For all who happen upon this thread looking for recent information, here it is.

    Corsair FORCE GT 480GB 1.5yrs old. Writes on file vault 2 were under 250mb/s. Noticed the performance degradation.

    Secure erased free space
    repaired disk
    disabled file vault 2

    New write speeds are 438mb/s almost matching the read speeds at 4510 mb/s.

    FileVault 2 will show you extreme performance degradation and should be avoided for all who spent the money upgrading to an SSD.
     
  24. Bear macrumors G3

    Joined:
    Jul 23, 2002
    Location:
    Sol III - Terra
    #24
    As it was stated, it depends on the SSD. Apple branded SSDs don't have such a loss when using FileVault 2. Nor do some other brand SSDs.
     
  25. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #25
    That is because your SSD uses a Sandforce controller, and Sandforce controllers have lousy write speeds with incompressible data. With FV2 on, essentially all your data looks like it is incompressible, hence the write speed slowdown you saw. This should not impact read speeds though.

    Most day to day operations are more impacted by read speeds. Before you ran the benchmark, did you really notice the write speed drop. Unless you are frequently writing some large files, I would be surprised if you could tell the difference.

    (I don't mean to be argumentative with you here. I am genuinely curious if you could feel a difference in write speeds in day to day use with FV2 on vs. off, and if so what were you doing when you noticed the difference?)
     

Share This Page