Public bug reported:

Apologies if this is not the right forum to raise this concern.  If not
please point me to a better place to have this discussion.

The 5.3 linux kernel added a new feature which allows pages to be zeroed
when allocating or freeing them: init_on_alloc and init_on_free. The
init_on_alloc flag is enabled by default on the Ubuntu 18.04 HWE kernel.

Linux kernel commit:
https://github.com/torvalds/linux/commit/6471384af2a6530696fc0203bafe4de41a23c9ef

ZFS allocates and frees pages frequently (via the ABD structure), e.g.
for every disk access. The additional overhead of zeroing these pages is
significant. For example, I measured a ~40% regression in performance of
an uncached "zfs send ... >/dev/null".  While this is a specific
workload, this is a general problem because whenever we read from disk
we are going to allocate pages, unnecessarily zero them, and then
immediately fill them with the data from disk.

I don't see any mechanism for ZFS to request that pages *not* be zeroed
when they are allocated.

This performance regression has been noted by users of ZFS on Ubuntu:
https://github.com/zfsonlinux/zfs/issues/9910

I'd like to request that the default in Ubuntu be changed to
init_on_alloc=0, so that users of ZFS on Ubuntu do not experience this
performance regression.

(FYI, my employer, Delphix, has worked around this by changing the
default in our product, but my concern is that the vast majority of
Ubuntu users will simply experience this as "Ubuntu HWE is much slower
than before".)

$ cat /proc/version_signature
Ubuntu 5.3.0-28.30~18.04.1-generic 5.3.13

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

** Attachment added: "lspci-vnvn.log"
   
https://bugs.launchpad.net/bugs/1862822/+attachment/5327397/+files/lspci-vnvn.log

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

Title:
  init_on_alloc=1 causes big performance regression for ZFS

Status in linux package in Ubuntu:
  New

Bug description:
  Apologies if this is not the right forum to raise this concern.  If
  not please point me to a better place to have this discussion.

  The 5.3 linux kernel added a new feature which allows pages to be
  zeroed when allocating or freeing them: init_on_alloc and
  init_on_free. The init_on_alloc flag is enabled by default on the
  Ubuntu 18.04 HWE kernel.

  Linux kernel commit:
  
https://github.com/torvalds/linux/commit/6471384af2a6530696fc0203bafe4de41a23c9ef

  ZFS allocates and frees pages frequently (via the ABD structure), e.g.
  for every disk access. The additional overhead of zeroing these pages
  is significant. For example, I measured a ~40% regression in
  performance of an uncached "zfs send ... >/dev/null".  While this is a
  specific workload, this is a general problem because whenever we read
  from disk we are going to allocate pages, unnecessarily zero them, and
  then immediately fill them with the data from disk.

  I don't see any mechanism for ZFS to request that pages *not* be
  zeroed when they are allocated.

  This performance regression has been noted by users of ZFS on Ubuntu:
  https://github.com/zfsonlinux/zfs/issues/9910

  I'd like to request that the default in Ubuntu be changed to
  init_on_alloc=0, so that users of ZFS on Ubuntu do not experience this
  performance regression.

  (FYI, my employer, Delphix, has worked around this by changing the
  default in our product, but my concern is that the vast majority of
  Ubuntu users will simply experience this as "Ubuntu HWE is much slower
  than before".)

  $ cat /proc/version_signature
  Ubuntu 5.3.0-28.30~18.04.1-generic 5.3.13

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1862822/+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