diff options
author | RageLtMan <rageltman [at] sempervictus> | 2017-03-18 00:51:36 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-05-04 17:59:52 -0400 |
commit | 5731140eaf4aaf2526a8bfdbfe250195842e79eb (patch) | |
tree | 2427476343f5aef0e6a70973465086bba06d0f88 /module/zfs | |
parent | 4cb932d95140e358426cb7ca8505ee5e66939bcc (diff) |
Disable write merging on ZVOLs
The current ZVOL implementation does not explicitly set merge
options on ZVOL device queues, which results in the default merge
behavior.
Explicitly set QUEUE_FLAG_NOMERGES on ZVOL queues allowing the
ZIO pipeline to do its work.
Initial benchmarks (tiotest with no O_DIRECT) show random write
performance going up almost 3X on 8K ZVOLs, even after significant
rewrites of the logical space allocation.
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Chunwei Chen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: RageLtMan <rageltman@sempervictus>
Issue #5902
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zvol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 7590ed316..d0f7b9912 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1468,6 +1468,9 @@ zvol_alloc(dev_t dev, const char *name) blk_queue_make_request(zv->zv_queue, zvol_request); blk_queue_set_write_cache(zv->zv_queue, B_TRUE, B_TRUE); + /* Disable write merging in favor of the ZIO pipeline. */ + queue_flag_set(QUEUE_FLAG_NOMERGES, zv->zv_queue); + zv->zv_disk = alloc_disk(ZVOL_MINORS); if (zv->zv_disk == NULL) goto out_queue; |