0

Working on a project with a custom arm board , we are building the os using Buildroot,recently wanted to enable file system based encryption using fscryptctl a lightweight version of fscrypt. the Idea is that you basically use a special key for each folder you want to encrypt.I wanted to benchmark the solution to estimate performance cost of adding encryption, in which I use fio to write a 1G file into an encrypted folder vs the same operation inside a 'normal' folder.

The surprising thing, is that the write bandwith when using encrypted folder is ~ 4.2 MB/s vs 1.1 MB/s for the normal folder. To me this doesn't make any sense, but I suspect that it has to do with wrong configuration on my normal filesystem (using ext4), that are inhibited when switching encryption.

Can someone please explain to me what is happening and how to debug this further ?

Note that to enable encryption I had to enable these linux configuration :

CONFIG_FS_ENCRYPTION=y 
CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
CONFIG_BLK_INLINE_ENCRYPTION=y 
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y 

Note the CONFIG_FS_ENCRYPTION_INLINE_CRYPT is about using hardware crypto acceleration capabilities, but this shouldn't affect the normal case as no crypto should be involved, right ?

0 Answers0