filevault 2 slow sierra
I work in IT at a small college, and we regularly encrypt faculty, staff, and loaner computers using FileVault 2. The process usually takes about 8 hours with a hard disk drive, depending on size it can be a little more or a little less. Our standard practice is to leave it running overnight. With macOS Sierra we are seeing it take about 3 days if left unattended.
After some investigation it turns out that the disk speed is throttled every 5 minutes, going from about 30-35 MB/sec to 3-5 MB/sec if the computer is not in use. It stays at the low rate until the user takes some action, like a mouseclick, and it then recovers for another 5 minutes. It appears that the culprit is DuetHeuristic-BM, which is responsible for running periodic tasks like checking whether it's time to do a Time Machine update (Time Machine is not configured on these machines, but just for the sake of example).
This is 100% reproducible across multiple computers with traditional HDD's, and persists at least through 10.12.4. Occurs on clean OS installs as well as computers loaded with our images. Have not tested on SSD's. The common factor is macOS Sierra, which I believe introduced DuetHeuristic-BM.
The net result is that the computer will encrypt much faster if it is being used during the encryption process. That's practical in some cases for us, not in others.
macOS Sierra (10.12), FIleVault 2