]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Prefetch on deadlists merge
authorAlexander Motin <mav@FreeBSD.org>
Wed, 25 Jan 2023 19:30:24 +0000 (14:30 -0500)
committerGitHub <noreply@github.com>
Wed, 25 Jan 2023 19:30:24 +0000 (11:30 -0800)
commitdc5c8006f684b1df3f2d4b6b8c121447d2db0017
treee0a48245fc28b5d55d3d5266f56a90e359424bac
parentc85ac731a0ec16e4277857b55ebe123c552365b6
Prefetch on deadlists merge

During snapshot deletion ZFS may issue several reads for each deadlist
to merge them into next snapshot's or pool's bpobj.  Number of the dead
lists increases with number of snapshots.  On HDD pools it may take
significant time during which sync thread is blocked.

This patch introduces prescient prefetch of required blocks for up to
128 deadlists ahead.  Tests show reduction of time required to delete
dataset with 720 snapshots with randomly overwritten file on wide HDD
pool from 75-85 to 22-28 seconds.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Issue #14276
Closes #14402
include/sys/bpobj.h
module/zfs/bpobj.c
module/zfs/dsl_deadlist.c