3

I am considering two options to encrypt some data:

  • add a new encrypted partition
  • add an encrypted disk image

Which option is faster in terms of disk read/write speed? I suspect that an encrypted disk image would have a worse performance than using an encrypted partition, but I am not sure.

  • 1
    For security, I would go with an encrypted partition. I suspect that the performance differences will be small, compared to the differences in security offered. If your Boot partition is NOT encrypted there are all sorts of ways that data can leak from your secure disk image to the unencrypted disk. Apps cache, index, copy to scratch or backup files, and other things with data. – Lee Joramo May 19 '15 at 17:23
  • If you are talking about a USB keychain drive, I would use encrypted disk images if you want to use the USB drive to share other files (this could include sharing the encrypted disk image). If you are not sharing it, I would encrypted the whole drive to provide more security. – Lee Joramo May 19 '15 at 17:28
1

An encrypted partition would likely be faster. With a disk image, you're actually accessing two filesystems, one within the disk image, and the one on which the disk image is stored, as well as the technologies needed to read the disk image itself. It seem unlikely that a disk image could ever be faster than full-disk encryption, but you would have to run benchmarks to be certain.

0

The difference is minimal, from my experience.

When I made a fresh upgrade to Yosemite, I did some tests. I have 16Gb RAM, and 2 internal SSDs - one unencrypted, and one encrypted with FileVault2. On the encrpyted disk, there's a encrypted sparsebundle where Firefox profiles are stored. I can't remembered the numbers, but after comparing the read/write speeds, I choose double encrypted sparsebundle and FileVault2.

Modern CPUs are specially designed circuit to handle AES encryption/decryption. So it only counts for 1-2% additional load on CPU. The speed you will have is ultimately decided by other factors such as CPU (speed/core), RAM (speed/size), drive I/O speed. You have to decide whether the compromise is worth it.

0

As another data point, I tested with a regular non-SSD hard drive via USB3.0 and two volumes, one an encrypted partition and the other an encrypted sparseimage on an unencrypted partition.

For large file transfers to the encrypted partition, the speed topped out at about 50MB/s, while transfers to the sparseimage topped out at about 2.5MB/s.

So that's about a 20x performance difference which seems pretty extreme but was fairly consistent in my non-scientific tests. Part of the problem could have been that the sparesimage was having to expand itself during the copy operations, but it still seems pretty slow.

As a reference, copies to the unencrypted partition ran around 70MB/s.

To summarize:

 2.5 MB/s  encrypted sparseimage on unencrypted partition
50.0 MB/s  encyrpted partition
70.0 MB/s  unencrypted partition

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .