init_on_alloc=1 causes big performance regression for ZFS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
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:/
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:/
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_
Ubuntu 5.3.0-28.
---
ProblemType: Bug
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Feb 11 18:34 seq
crw-rw---- 1 root audio 116, 33 Feb 11 18:34 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.9
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 18.04
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb: Error: [Errno 2] No such file or directory: 'lsusb': 'lsusb'
MachineType: VMware, Inc. VMware Virtual Platform
NonfreeKernelMo
Package: linux (not installed)
PciMultimedia:
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 svgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.173.14
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: bionic uec-images
Uname: Linux 5.3.0-28-generic x86_64
UnreportableReason: This report is about a package that is not installed.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: linux-staff root
WifiSyslog:
_MarkForUpload: False
dmi.bios.date: 12/12/2018
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 6.00
dmi.board.name: 440BX Desktop Reference Platform
dmi.board.vendor: Intel Corporation
dmi.board.version: None
dmi.chassis.
dmi.chassis.type: 1
dmi.chassis.vendor: No Enclosure
dmi.chassis.
dmi.modalias: dmi:bvnPhoenixT
dmi.product.name: VMware Virtual Platform
dmi.product.
dmi.sys.vendor: VMware, Inc.
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1862822
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.