Public bug reported:

In an upgrade from Jammy kernel 5.15.0-27-generic to 5.15.0-35-generic
on x86_64 (AMD threadripper pro 39x5wx series), a 40x performance
regression in the first read of cached writes to an encrypted dataset
revealed that zfs is no longer configured to choose any implementations
from advanced instruction sets:

$ grep . /sys/module/icp/parameters/*impl*
/sys/module/icp/parameters/icp_aes_impl:cycle [fastest] generic x86_64
/sys/module/icp/parameters/icp_gcm_impl:cycle [fastest] generic

With correct configuration, the output should read as follows:

$ grep . /sys/module/icp/parameters/*impl*
/sys/module/icp/parameters/icp_aes_impl:cycle [fastest] generic x86_64 aesni
/sys/module/icp/parameters/icp_gcm_impl:cycle [fastest] avx generic pclmulqdq

The immediate ill effects are the use of gcm_generic_mul instead of the
dedicated instruction, consuming 50% CPU and slowing reads of data
cached in ram to less than 20% of what they would be even reading
directly from disk.

openzfs changed its configure process to detect cpu features differently
recently to adapt to the kernel api change. It seems that the upstream
changes that unexport the needed symbols and the downstream changes in
openzfs that stop using them were not cherrypicked in sync.

https://github.com/openzfs/zfs/pull/13147
https://github.com/openzfs/zfs/pull/13236

** Affects: zfs-linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1977699

Title:
  zfs icp has deselected all optimized aes & gcm impls

Status in zfs-linux package in Ubuntu:
  New

Bug description:
  In an upgrade from Jammy kernel 5.15.0-27-generic to 5.15.0-35-generic
  on x86_64 (AMD threadripper pro 39x5wx series), a 40x performance
  regression in the first read of cached writes to an encrypted dataset
  revealed that zfs is no longer configured to choose any
  implementations from advanced instruction sets:

  $ grep . /sys/module/icp/parameters/*impl*
  /sys/module/icp/parameters/icp_aes_impl:cycle [fastest] generic x86_64
  /sys/module/icp/parameters/icp_gcm_impl:cycle [fastest] generic

  With correct configuration, the output should read as follows:

  $ grep . /sys/module/icp/parameters/*impl*
  /sys/module/icp/parameters/icp_aes_impl:cycle [fastest] generic x86_64 aesni
  /sys/module/icp/parameters/icp_gcm_impl:cycle [fastest] avx generic pclmulqdq

  The immediate ill effects are the use of gcm_generic_mul instead of
  the dedicated instruction, consuming 50% CPU and slowing reads of data
  cached in ram to less than 20% of what they would be even reading
  directly from disk.

  openzfs changed its configure process to detect cpu features
  differently recently to adapt to the kernel api change. It seems that
  the upstream changes that unexport the needed symbols and the
  downstream changes in openzfs that stop using them were not
  cherrypicked in sync.

  https://github.com/openzfs/zfs/pull/13147
  https://github.com/openzfs/zfs/pull/13236

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1977699/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to