Upgrade form 13.2-RELEASE-p5 to 14.0-RELEASE took almost 24hours

From: Chris Kiakas <chris_at_tellme3times.com>
Date: Fri, 24 Nov 2023 15:28:50 UTC
This is the second system I’m upgrading which seems to take forever compared to previous upgrades.

The first system was a simple install that I use to test frr. The system's original install was 13.2.-RELEASE and was upgraded over time to 13.2-RELEASE-p5. 1TB ZFS HDD. The upgrade to 14.0-RELEASE was standard up to the first reboot. After the reboot the next freebsd-update install seemed to take a long time. I did’t pay much attention because I was busy but there were no errors. It just felt long.


The second system has a raidz2 with 7 hard disks and is running 5 iocage jails. It has 256G RAM. I’m in the process of the upgrade to 14.0-RELEASE.

Everything was as usual up until the second freebsd-upgrade install. The one we preform after the reboot. It took about 20 hours.

On the release notes we have the following;

ZFS Changes

OpenZFS has been upgraded to version 2.2. New features include:

	• block cloning, which allows shallow copies of blocks in file copies. This is optional, and disabled by default; it can be enabled with sysctl vfs.zfs.bclone_enabled=1.

	• scrub error log (zpool scrub -e)

	• BLAKE3 checksums, which are fast, and are now the recommended secure checksums

	• corrective zfs receive can heal corrupted data

	• vdev and zpool user properties, similar to dataset user properties.



After searching on Google I came across; https://www.reddit.com/r/freebsd/comments/181ayev/freebsd_14_stuck_during_upgrade/

which discusses the following as a solution.

Spurious fsync() in freebsd-update after every write interacts poorly with the file system, mostly because block cloning is not enabled, so copy_file_range turns into a massive pessimization.

Suggested a workaround is:

'sysctl vfs.zfs.dmu_offset_next_sync=0'

because you sure do not want to enable block cloning in ZFS.

Problem was reported on freebsd-current in late October


My question is;

Is this the proper step to speed up the install or could this lead to other issues?

I have 5 iocage jails to upgrade and if they take as long as the original upgrade It will take at least the whole weekend.


Chris