Skip to content

Commit

Permalink
zvol_os.c: Increase optimal IO size
Browse files Browse the repository at this point in the history
Since zvol read and write can process up to (DMU_MAX_ACCESS / 2) bytes
in a single operation, the current optimal I/O size is too low. SCST
directly reports this value as the optimal transfer length for the
target SCSI device. Increasing it from the previous volblocksize results
in performance improvement for large block parallel I/O workloads.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes openzfs#16750
  • Loading branch information
ixhamza authored and behlendorf committed Nov 15, 2024
1 parent ee3677d commit 4c9f2ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/os/linux/zfs/zvol_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ zvol_queue_limits_init(zvol_queue_limits_t *limits, zvol_state_t *zv,
limits->zql_max_segment_size = UINT_MAX;
}

limits->zql_io_opt = zv->zv_volblocksize;
limits->zql_io_opt = DMU_MAX_ACCESS / 2;

limits->zql_physical_block_size = zv->zv_volblocksize;
limits->zql_max_discard_sectors =
Expand Down

0 comments on commit 4c9f2ce

Please sign in to comment.