mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-07-15 04:07:40 +03:00
ZTS: Reduce extra caching in pool_checkpoint (#17268)
Those tests are write-mostly at the nested pool. Considering we have
3 more layers of caching underneath, we can hint ZFS how to use the
memory better by setting primarycache=metadata.
While there, add missing zpool sync after rm in checkpoint_capacity
before we could potentially see the freed space, would not there be
a pool checkpoint.
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
(cherry picked from commit 1ef706c4ad
)
This commit is contained in:
parent
28f0c5cfdc
commit
273db246a4
@ -60,14 +60,15 @@ log_must set_tunable32 SPA_ASIZE_INFLATION 4
|
||||
log_must zfs create $DISKFS
|
||||
|
||||
log_must mkfile $FILEDISKSIZE $FILEDISK1
|
||||
log_must zpool create $NESTEDPOOL $FILEDISK1
|
||||
log_must zpool create -O primarycache=metadata $NESTEDPOOL $FILEDISK1
|
||||
|
||||
log_must zfs create -o compression=lz4 -o recordsize=8k $NESTEDFS0
|
||||
log_must zfs create $NESTEDFS0
|
||||
log_must dd if=/dev/urandom of=$NESTEDFS0FILE bs=1M count=700
|
||||
FILE0INTRO=$(head -c 100 $NESTEDFS0FILE)
|
||||
|
||||
log_must zpool checkpoint $NESTEDPOOL
|
||||
log_must rm $NESTEDFS0FILE
|
||||
log_must sync_pool $NESTEDPOOL
|
||||
|
||||
#
|
||||
# only for debugging purposes
|
||||
|
@ -139,7 +139,8 @@ function setup_nested_pool
|
||||
log_must truncate -s $DISKSIZE $FILEDISK1
|
||||
log_must truncate -s $DISKSIZE $FILEDISK2
|
||||
|
||||
log_must zpool create -O sync=disabled $NESTEDPOOL $FILEDISKS
|
||||
log_must zpool create -O primarycache=metadata -O sync=disabled \
|
||||
$NESTEDPOOL $FILEDISKS
|
||||
}
|
||||
|
||||
function setup_test_pool
|
||||
|
Loading…
Reference in New Issue
Block a user