6 ms·
Another reason is that read/write speeds on APFS encrypted volumes are 30-40% slower than non-encrypted volumes[1]. [1] https://news.ycombinator.com/item?id=15
by Osiris 9y ago
Another reason is that read/write speeds on APFS encrypted volumes are 30-40% slower than non-encrypted volumes[1].
[1] https://news.ycombinator.com/item?id=15333036 https://news.ycombinator.com/item?id=15333036
- nrki 9y agoSpeed in MB/s HFS+ HFS+ Encrypted APFS APFS Encrypted 1M WRITE 1375 1373 1372 933 1M READ 2446 2340 2162 1304 4K WRITE 852 797 502 378 4K READ 2106 1486 2156 1001 https://news.ycombinator.com/item?id=15333754 https://news.ycombinator.com/item?id=15333754
- mikeash 9y agoThat's really strange. Why would encryption affect APFS so badly but not HFS+?
- convivialdingo 9y agoLots of reasons. If crypto is part of the syscall path, then you definitely pay with latency. If you can push IO to a worker thread then you can release the user call faster. This also requires tuning the read-ahead cache more aggressively. It could also be a change in crypto algorithm, unaligned page IO, or any other overlooked IO latency problems.
- j45 9y agoAt a high level, I believe APFS encrypts files individually (and uniquely) instead of the whole drive. Have to do some more reading :)
- Someone 9y agoNot instead of, but optionally in addition to (https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/Features/Features.html https://developer.apple.com/library/content/documentation/Fi...) On Mac OS, it seems you only get full disk encryption, though (https://arstechnica.com/gadgets/2017/09/macos-10-13-high-sierra-the-ars-technica-review/6/ https://arstechnica.com/gadgets/2017/09/macos-10-13-high-sie...)
- j45 9y agoAppreciate the clarification. Both are better than just one.
- zitterbewegung 9y agoThis was high sierra beta though.
- ringaroundthetx 9y agoJust curious, at these speeds, what use case would really affect you, or people you can imagine? 30-40% in a stress test is significant. but if I'm not editing 4k videos perhaps, where would I notice this? Even amongst us programmers who use horrible inefficient IDEs and make horrible inefficient electron apps, disk speed isn't really a noticeable bottleneck right now? Even a convoluted local environment to simulate a server environment with a ton of microservices wouldn't really be affected much by this
- finnh 9y agoDisk speed is always a bottleneck, much more than CPU generally. Almost every thing you do leads to, or is dependent on, IO speeds. If you disk speed drops by 40%, for example, every application will be at least 40% slower to load. That's a major hit. That horribly inefficient electron app is now slow to load, not just slow to run. Or, to put this another way: Do you have an SSD? Why?
- frou_dh 9y agoThe filesystem is cached in RAM so it’s too simplistic to talk about applications like that.
- ringaroundthetx 9y agoyeah, not always true, and this is more about noticeable performance. The answer is to why I have an SSD is speed and throughput and the point of calling this file system change out is because there are diminishing returns to the productivity in real world use a benchmark is just a repeated process which is not reflective or real world use except in very small narrowly tailored applications
- bouke 9y agoAs the speed test was using a beta of High Sierra / APFS, I performed some tests of my own. I've written /dev/zero to the disk, and read Xcode_9_GM_seed.xip from the disk using different block sizes using `dd`. I ran the read tests a few times, as there was a lot variation in the results. I've excluded the first result of the read results for each FS. The test was run on a Samsung Evo Pro 850 500GB SSD inside a Sharkoon USB-C case connected over USB-C to a MacBook Pro 2016 w/ Touchbar. Speed in MB/s HFS+ HFS+ Encrypted APFS APFS Encrypted 1M write 498 473 490 (-2%) 444 (-6%) 1M read 6896 6815 6860 (-1%) 6827 (0%) 4k write 486 477 485 (-0%) 445 (-7%) 4k read 2734 2709 2599 (-5%) 2545 (-6%) While there is still some performance degradation between HFS+ and APFS, it's within a single digit now.
- stirner 9y agodd is not an acceptable benchmark. You need to eliminate the effects of buffering/caching to get accurate results.
- Someone1234 9y ago/dev/zero is also not an acceptable source of data; since \0\0\0\0\etc is unnaturally easy to compress. A large real file (e.g. installation ISO) may have been a better idea.
- bouke 9y agoFollowing the comments on the test method, I've run the 'Blackmagic Disk Speed Test'. The results are the following. Speed in MB/s HFS+ HFS+ Encrypted APFS APFS Encrypted read 513 513 508 506 write 477 460 478 432 The earlier results of 7 GB/s are quite impossible with the Samsung Evo Pro 850 -- those max out around 500 MB/s. So my earlier test results are invalid. The new test results mostly show that both file systems can saturate the disk's raw throughput. -- update On my internal Apple SSD (PCI-Express) I've created a partition for testing. I've kept "Blackmagic Disk Speed Test" running for a few minutes and took an average of the tests. The results are in favor of APFS, beating HFS+ by 3-17% in throughput. Speed in MB/s HFS+ HFS+ Encrypted APFS APFS Encrypted read 2400 2240 2700 (+13%) 2400 (+7%) write 1900 1930 2000 (+5%) 1980 (+3%)
- timcederman 9y agoJust tested this. Was consistently getting 2000mb/s+ writes before, now getting ~1600mb/s. Reads are inconsistent, but most results are also 20-40% slower than before.