]> git.proxmox.com Git - mirror_zfs.git/commit
Improve ZVOL queue behavior.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Mon, 5 Sep 2011 13:15:45 +0000 (15:15 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 Feb 2012 00:23:06 +0000 (16:23 -0800)
commit34037afe24e0bff97cf5262f8f1a76f5e0815dc1
tree563a33de02991aeade1393ef1c61f4b46d733474
parentb18019d2d810585185493c62e9567fa85e51692c
Improve ZVOL queue behavior.

The Linux block device queue subsystem exposes a number of configurable
settings described in Linux block/blk-settings.c. The defaults for these
settings are tuned for hard drives, and are not optimized for ZVOLs. Proper
configuration of these options would allow upper layers (I/O scheduler) to
take better decisions about write merging and ordering.

Detailed rationale:

 - max_hw_sectors is set to unlimited (UINT_MAX). zvol_write() is able to
   handle writes of any size, so there's no reason to impose a limit. Let the
   upper layer decide.

 - max_segments and max_segment_size are set to unlimited. zvol_write() will
   copy the requests' contents into a dbuf anyway, so the number and size of
   the segments are irrelevant. Let the upper layer decide.

 - physical_block_size and io_opt are set to the ZVOL's block size. This
   has the potential to somewhat alleviate issue #361 for ZVOLs, by warning
   the upper layers that writes smaller than the volume's block size will be
   slow.

 - The NONROT flag is set to indicate this isn't a rotational device.
   Although the backing zpool might be composed of rotational devices, the
   resulting ZVOL often doesn't exhibit the same behavior due to the COW
   mechanisms used by ZFS. Setting this flag will prevent upper layers from
   making useless decisions (such as reordering writes) based on incorrect
   assumptions about the behavior of the ZVOL.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
64 files changed:
Makefile.in
cmd/Makefile.in
cmd/mount_zfs/Makefile.in
cmd/sas_switch_id/Makefile.in
cmd/zdb/Makefile.in
cmd/zfs/Makefile.in
cmd/zinject/Makefile.in
cmd/zpios/Makefile.in
cmd/zpool/Makefile.in
cmd/zpool_id/Makefile.in
cmd/zpool_layout/Makefile.in
cmd/ztest/Makefile.in
cmd/zvol_id/Makefile.in
config/kernel-blk-queue-io-opt.m4 [new file with mode: 0644]
config/kernel-blk-queue-max-hw-sectors.m4 [new file with mode: 0644]
config/kernel-blk-queue-max-segments.m4 [new file with mode: 0644]
config/kernel-blk-queue-nonrot.m4 [new file with mode: 0644]
config/kernel-blk-queue-physical-block-size.m4 [new file with mode: 0644]
config/kernel.m4
configure
dracut/90zfs/Makefile.in
dracut/Makefile.in
etc/Makefile.in
etc/init.d/Makefile.in
etc/zfs/Makefile.in
include/Makefile.in
include/linux/Makefile.in
include/linux/blkdev_compat.h
include/sys/Makefile.in
include/sys/fm/Makefile.in
include/sys/fm/fs/Makefile.in
include/sys/fs/Makefile.in
lib/Makefile.in
lib/libavl/Makefile.in
lib/libefi/Makefile.in
lib/libnvpair/Makefile.in
lib/libshare/Makefile.in
lib/libspl/Makefile.in
lib/libspl/asm-generic/Makefile.in
lib/libspl/asm-i386/Makefile.in
lib/libspl/asm-x86_64/Makefile.in
lib/libspl/include/Makefile.in
lib/libspl/include/ia32/Makefile.in
lib/libspl/include/ia32/sys/Makefile.in
lib/libspl/include/rpc/Makefile.in
lib/libspl/include/sys/Makefile.in
lib/libspl/include/sys/dktp/Makefile.in
lib/libspl/include/sys/sysevent/Makefile.in
lib/libspl/include/util/Makefile.in
lib/libunicode/Makefile.in
lib/libuutil/Makefile.in
lib/libzfs/Makefile.in
lib/libzpool/Makefile.in
man/Makefile.in
man/man8/Makefile.in
module/zfs/zvol.c
scripts/Makefile.in
scripts/zpios-profile/Makefile.in
scripts/zpios-test/Makefile.in
scripts/zpool-config/Makefile.in
scripts/zpool-layout/Makefile.in
udev/Makefile.in
udev/rules.d/Makefile.in
zfs_config.h.in