0

When writing any data to SD cards, the operation is usually very slow compared to other kinds of media (up to tens ob MBytes/s). However, when using an encrypted file system on the SD card, such as encrypted APFS, the write operations tend to be even slower, for example one fourth of the transfer rate. Why is this the case? Modern CPUs should provide special instructions that are also used for any other file vault operation.

  • Can you provide some measurements for this, ideally comparing unencrypted and encrypted APFS? – nohillside Jul 13 at 13:42
  • This highly depends on the SD card, however I have seen differences on the order of -50 to -75% write speed when enabling APFS encryption on SD cards. – user73014 Jul 13 at 13:47
  • 1
    I’ve benchmarked APFS and HFS to be basically equivalent on non HDD media. You might need to share how you set things up or show diskutil apfs list to be sure you don’t have an encryption / migration still running while you are performing your measurements. – bmike Jul 13 at 14:07
  • I never stated that this does not apply to HFS+ as well. But the statement especially holds for APFS, which I used. – user73014 Jul 14 at 15:04
1

I suspect the encrypted vs unencrypted read and write speed has to do with continuous vs random performance on (Micro-) SD cards as measured and described here: https://www.jeffgeerling.com/blog/2019/raspberry-pi-microsd-card-performance-comparison-2019

You must log in to answer this question.

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