openzfsonosx / zfs

OpenZFS on OS X

Home Page:https://openzfsonosx.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hardware-accelerated AES encryption/decryption

fumoboy007 opened this issue · comments

I am experimenting with encrypted datasets. The performance of aes-256-ccm has been abysmal.

Does ZFS use the AES-NI CPU instructions if available? If so, how can I tell?

The code is in module/icp/asm-x86_64/aes/aes_aesni.S. By default, the fastest is supposed to be selected, among generic x86_64 aesni. There is sysctl kstat.zfs.darwin.tunable.icp_aes_impl, which should tell you that. Trying to change it gave me a KP :).

I benchmarked performance quickly, here's what BlackMagic speed test gave me (on an SSD that could be quite a bit faster), using aes-256-gcm (which is the recommended cipher I think).

zfs-aes-gcm