Bug 228397

Summary: freebsd-update: take a HardenedBSD-like approach to major upgrades
Product: Base System Reporter: Slawomir Wojciech Wojtczak <vermaden>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: 0mp, arved, emaste, grahamperrin, r, steve.p, tomek
Priority: --- Keywords: feature, needs-qa, performance
Version: 11.1-RELEASE   
Hardware: Any   
OS: Any   

Description Slawomir Wojciech Wojtczak 2018-05-21 13:00:40 UTC
Hi,

upgrade from up-to-date FreeBSD 11.1-RELEASE-p10 to FreeBSD 11.2-BETA2 takes forever ...

It took several hours ro fetch 45000+ (!) patches, then several hours to install them and now several hours to finish the installation after the reboot ... and this is on a SSD drive ... imagine the same process on CLASS 4 SD card with Raspberry Pi 2 ... ages.

IMHO current 'patches' approach is good for security updates (from p8 to p9 for example) but its not suited for large upgrades like major version change.

IMHO HardenedBSD approach is better here (and magnitudes faster) with fetching the whole new image and merging the differences.

If it would be me I would left current 'patches method' for minor updated (between pX versions) and would import the HardenedBSD 'way' for major upgrades like from 11.1-RELEASE to 11.2-RELEASE.


Regards,
vermaden
Comment 1 Ricardo Fraile 2018-12-24 11:45:41 UTC
Hi,

I can confirm this behaviour. Trying to upgrade from 11.2-RELEASE to 12.0-RELEASE takes around 9 hours on a system with a SD card as disk and a poor network 3G link.

If the network link have issues when the upgrade is in "Fetching xxx patchs", the whole process of upgrade crash and, at that point, it have been started up around 6 hours ago. Starting up it again begins at the beggining, it doesn't have any swich to start when it fails.

The solution recomended by Vermaden looks reasonable.

Thanks,
Comment 2 steve.p 2019-01-31 03:06:20 UTC
Phase 2, which i believe is the world update, takes forever... well 2 hours on a 4  month old high end machine. 1GB network. 

I don't have time to debug at the moment. I used to be able to run make build-world faster. Did someone add a debug sleep to one of the processes somewhere and forgot to remove?

This is painful.
Comment 3 steve.p 2019-02-01 15:56:09 UTC
I did a little more research on an offline machine. The decompression is extremely slow on several files. This seems to be the largest impact on the installation.
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2021-04-21 14:01:14 UTC
still slow in 13.0
Comment 5 Tomasz "CeDeROM" CEDRO 2021-07-18 11:36:20 UTC
Somehow related, I have reported an idea to add freebsd-update and pkg-static autiomation download: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257247 :-)
Comment 6 Graham Perrin 2023-10-06 15:53:29 UTC
Developers: please, can you foresee implementation of things such as this before PkgBase becomes the norm?

^Triage: 

* summary line edition, harmonious with the feature keyword
* severity reduced to the norm for an enhancement request.