This project has moved and is read-only. For the latest updates, please go here.

Performance issues (SSD and HDD)

Topics: Technical Issues
Jul 20, 2016 at 9:45 AM
Edited Jul 20, 2016 at 9:51 AM
First, since this is my first post here, let me thank the VeraCrypt community for having first resurrected and then moved on the TrueCrypt project. I've been a TrueCrypt user for several years and in these days I'm switching to VeraCrypt.

My question has to do with performance. I have two questions, the former related to an encrypted partition on a SSD drive, the latter related to an encrypted partition on a HDD drive. First, let me describe my hw/sw setup:
  • MacBook Pro (15-inch, Late 2011), El Capitan
  • 2,4 GHz Intel Core i7 x 4
  • 16 GB 1333 MHz DDR3
  • 512 GB Samsung SSD 840 PRO rated at 500+ MB/s
  • 750 GB WDC WD7500BPKT-00PK4T0 (Black Scorpio) rated at 160 MB/s (mounted with OptiBay)
Encryption is configured to use AES/Twofish/Serpent + Whirlpool, which benchmarks in RAM at least at 100MB/s. I can confirm I'm using the AES hardware support in the i7 processor.

The TrueCrypt performance (read/write in MB/s) for the SSD partition was 50/30; with VeraCrypt it improved to 73/73. That's quite good, but well below the hardware speed of the unit. I'm pretty aware of all the sort of complex interactions that encryption has with SSD (I've read a couple of posts here: https://veracrypt.codeplex.com/discussions/654510 and https://veracrypt.codeplex.com/discussions/656239). But they seem to be related to write performance, and not read. Consider that the same SSD has two more HFS+ encrypted partitions with FileVault2 and the performance is 300/80. So, write performance is quite similar and probably that's the upper limit I can reach because of all the SSD stuff; but read performance with HFS+ is quite better. VeraCrypt RAM benchmark with my configuration is about 150, so that's not the limit.

Given that, this is not my most important question: the SSD encrypted partition is quite small, it mostly contains documents and it's not severely affecting my work.

More important is the latter question, related to the HDD. Almost all of the HDD has been encrypted with TrueCrypt/VeraCrypt and the performance with TrueCrypt was 45/35. With VeraCrypt it seems to have dropped to 20/30. That's quite strange and not consistent with all the tests. My primary test is performed with the dd command line (for writing, copying /dev/zero to a file, for reading copying the file to /dev/null; of course, after purging RAM caches). It is mostly consistent with other benchmarks (e.g. BlackMagic), with the exception of the HDD. My most severe use case on the HDD is running a tool that computes the MD5 of 500GB of data for integrity purposes. The performance has moved from 35 (read) with TrueCrypt to 47 with VeraCrypt; so it shows an improvement, even though very small. The same task, performed on the very same machine and disk, years ago, before I encrypted the partition, was almost 100.

There could be other problems on the machine, which is part of the investigation I'm doing. The o.s. has been freshly re-installed a couple of days ago, to avoid any strange stuff. I have an anti-virus (Avast) that can perform file scanning, but I disable it while running these performance tests (in any case, numbers don't change: and the fact that I can get to 300 on HFS+ means that Avast is not the bottleneck).

A thing that is worth being mentioned is that while I see TrueCrypt/VeraCrypt using 100% of the CPUs while running the RAM benchmarks, this never occurs when running tasks on the disks. It just peaks at 250% of CPU usage out of a 800% max (4 cores * 2 threads each one).

Any suggestion is welcome. Thanks.