]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/zvol.c
Enable Linux read-ahead for a single page on ZVOLs
authorRichard Yao <ryao@gentoo.org>
Fri, 11 Jul 2014 18:35:58 +0000 (14:35 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 4 May 2017 22:00:27 +0000 (18:00 -0400)
commitbc17f1047a83cc8c4065e0ef84333a0d9b9d73aa
tree240277a2f851d5bcfe4839dcb7e720dd58662945
parent5731140eaf4aaf2526a8bfdbfe250195842e79eb
Enable Linux read-ahead for a single page on ZVOLs

Linux has read-ahead logic designed to accelerate sequential workloads.
ZFS has its own read-ahead logic called zprefetch that operates on both
ZVOLs and datasets. Having two prefetchers active at the same time can
cause overprefetching, which unnecessarily reduces IOPS performance on
CoW filesystems like ZFS.

Testing shows that entirely disabling the Linux prefetch results in
a significant performance penalty for reads while commensurate benefits
are seen in random writes. It appears that read-ahead benefits are
inversely proportional to random write benefits, and so a single page
of Linux-layer read-ahead appears to offer the middle ground for both
workloads.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Issue #5902
config/kernel-blk-queue-bdi.m4 [new file with mode: 0644]
config/kernel.m4
include/linux/blkdev_compat.h
module/zfs/zvol.c