freebsd update upgrade sucks

takes longer than reinstalling and probably longer than building from source
12.3 to 12.4 you need to restart sshd after the last install command or get locked out if you log out
creates (by default) both snapshot / and backup files in /var/db/freebsd-update/files which is wasteful
no geolocated servers
some stuff can be improved by fiddling with config file but still....
 
takes longer than reinstalling and probably longer than building from source
I doubt that. Although I never did an upgrade (only using this tool to update my ports testing jails, and they are reinstalled on a new minor) myself, I can tell you as soon as the changes require rebuilding base llvm, building takes considerable time :cool:

12.3 to 12.4 you need to restart sshd after the last install command or get locked out if you log out
I really like that no FreeBSD tool would ever automatically restart a service! But this should be documented of course. Is it? :-/

creates (by default) both snapshot / and backup files in /var/db/freebsd-update/files which is wasteful
Write a PR? I agree, one of them is enough. The IMHO sane approach would be to create a boot environment (snapshot) by default if they are available, otherwise the classic backup files.
 
I'm going to touch the time factor because it's been a long time since I've rebuilt everything from source, but the snapshot (isn't this really a new BE, not just a snapshot?)/backup files point is interesting.
Why the files in /var/db? I'm guessing they're for "freebsd-update rollback".
The new BE and rolling back is trivial since it's reboot, stop in loader, select the previous one, boot, delete the latest BE.
On a default ZFS install, /var/db should be following the BE, so deleting the backup files in /var/db should be safe.

I thought the creation of the new BE was configurable via /etc/freebsd-update.conf and the default was changed to "on" in 13.x, did it also change in 12?
There a few different methods posted on the forum where you create a new BE, mount it, chroot and other stuff to do the upgrade, you even run the pkg upgrade command in it to update the applications, then a single reboot into it and all the services would be running.
 
>>> World build started on Sun Dec 11 12:48:25 EET 2022
>>> World build completed on Sun Dec 11 15:04:12 EET 2022
my /var/db/freebsd_update/files was empty when i started and there is 2h30min between the earliest and latest file
granted i had the source downloaded and did not build the kernel on the build box but that box is a 2 core 4th gen i3 with spinning disk
so the build time is not that great either
 
it took more like 3 hours. no matter what mirror i chose it was dog slow
about 4-5 files/second
 
I've upgraded a box form 11.2 to 13.1 in less than 10 minutes with freebsd-update...
 
Everyone's network path is different, so I've never placed much faith in absolutes of "how long".
Now if someone says "12.1 took X but 12.x to 12.x+1 took 5X" that could be an interesting datapoint.

But that's just me.
 
I run update roughly once a week. It typically takes 5-10 minutes. Often, it takes zero, because there is nothing to do. Sometimes it takes half hour. Sometimes, I have to administer things afterwards, but very rarely.

I bet the speed depends heavily on network connection.
 
after some digging i found that adding
Code:
pipeline_prefetch 10
to squid.conf downloading improved by a lot (otherwise no in-flight requests and the kind of large TTL bites )
still hard to believe that upgrade including source can take less than 10 minutes
looks like freebsd-update is designed to conserve bandwidth which in my opinion does not work very well when doing a version upgrade
all the files can be downloaded from install mirrors which are third parties that pay for the bandwidth
downloading 50k patches and patching 50k files when you can download all the install txz files in less than a minute does not look that great to me
 
After upgrading, sshd (from OpenSSH 8.8p1) will not accept new connections until it is restarted. After installing the new userland, either reboot (as specified in the source update procedure), or execute service sshd restart.

The above message is from the Release notes of 13.1 and it's not included in Release notes of 12.4.
 
modifying squid.conf helped the download? Isn't squid a proxy thing in the network path?
I wonder if freebsd-update uses a different network protocol to download than git.
 
it uses http
but it issues lots of get requests without waiting for the reply after each, and then gets all the replies
this helps A LOT when round trip time from server to client is large

unless you have the directive above squid will issue every http get after it finishes with the previous get so download speed will suck
see phttpget(8) which is used by freebsd-update
 
  • Like
Reactions: mer
OP was comparing downloading files with freebsd-update vs updating/downloading the source tree via git.
No, he didn't mention updating the source, he compared it to building from source.
 
  • Like
Reactions: mer
That makes two of us. Just messed up a server at $DAYJOB trying to fix a 'too many files open' issue. Now nobody can login any more :rolleyes:
 
Back
Top