HomeFreeBSD

Prefetch on deadlists merge

Description

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

Details

Provenance
mavAuthored on Jan 25 2023, 7:30 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 2 2023, 10:37 PM
Parents
rGfd0893cf1ff3: Introduce minimal ZIL block commit delay
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb644a45bd4cd: Prefetch on deadlists merge (authored by mav).Mar 2 2023, 10:37 PM