Slow speeds when moving data to an encrypted image. Method for speeding it up

data transferdisk-utilityencryptionhard drive

With a new harddrive purchase I decided to encrypt it before moving all the data there.

I have followed some tutorial regarding encrypting the drive and have used disk utility to create and encrypted image on a 2TB Seagate hardrive, encrypted image is 1.8TB. When trying to move my data I realised that the speeds are horrendous and moving directly to the encrypted image is much slower than moving to the unencrypted part of the harddrive. Below is the comparison:

enter image description here

Here same files are copied to encrypted and unencrypted parts of the drive. Writing speed is about 18x slower for the encrypted part. I have seen in a related answer that a disk image encryption is much slower than the partition encryption. Hard drive is HDD, I have USB 3.0 port as well as cables for both drives.

Would speeds be much more favourable if the whole drive was encrypted?

What is the best way of encrypting a harddrive that will not affect the read/write speeds too much and will be mainly used with a macbook?

Thanks

Best Answer

Of course writing on an encrypted partition is slower than writing on an unencrypted one, because any writing operation goes through the encryption algorithm. For the same reason, writing on an encrypted disk image is slower than writing on an unencrypted disk image.

But, what you are comparing here is writing on an encrypted disk image EW(x) (x is the number of bytes to write) which is then written on an unencrypted filesystem W(x), against writing directly on an unencrypted filesystem W(x). And of course:

EW(x) + W(x) > W(x)

If you would like to measure correctly the overhead introduced by encryption you should compare writing directly on an encrypted filesystem against writing directly on an unencrypted filesystem. Then you would be comparing EW(x) and W(x).

Of course:

EW(x) > W(x)

But you would save a double writing on the same filesystem which can't bring you performance or security.