reboot takes forever (between 10-12 minutes)

Started by tessus, July 20, 2025, 02:16:43 AM

Previous topic - Next topic
I've been noticing this since 25.1. A reboot (e.g. after an update) takes forever (between 10-12 minutes).

Previously when the notice in the UI said "rebooting...", the machine rebooted right away. Now it takes about 500 seconds, before the machine does the reboot. It seems to me it is waiting for that amount of time before doing the actual reboot. Next time I will look into which processes are running during that "wait period".

Also, the boot process itself seems to take longer. Previously it took less than 3 minutes to reboot (from clicking reboot in the UI until being able to login the UI again).

It's not that critical (as long as the reboot actually works), but I thought I should mention it, since it seems strange to me that it takes more than 3 times as long as it did before.
Maybe someone has experienced this as well and found a solution. Who knows, it certainly doesn't hurt to create this topic.

Have a look under "System: Settings: Miscellaneous" - "Periodic Backups". I back up RRD data on power off, and it can take a bit of time. Periodic backup might increase writes, if SSD endurance is a concern. Of course this is only relevant if you have the RRD enabled ("Reporting: Settings" - "Reporting Database Options"). There may have been changes that slow down the backups - hard to say.

Also, I have AMD Zen 4 (Ryzen 7000) machines (including my firewall) which periodically retrain memory on reboot, which can take several minutes (particularly since I use ECC RAM). Generally cold boots only, but not always. BIOS dependent.

Quote from: pfry on July 20, 2025, 03:22:59 AMHave a look under "System: Settings: Miscellaneous" - "Periodic Backups". I back up RRD data on power off, and it can take a bit of time. Periodic backup might increase writes, if SSD endurance is a concern. Of course this is only relevant if you have the RRD enabled ("Reporting: Settings" - "Reporting Database Options"). There may have been changes that slow down the backups - hard to say.

Yes, the backups are set to "power off" and I am using Netflow and RRD. However, I am not sure I understand the backup. Why would I need a backup to be restored after a reboot as it is written in the help text.
The data is on the filesystem. This makes no sense to me.

So I think you are right. The backups probably take that much time, but as I mentioned, I don't understand why they are even necessary.
e.g. I run vnstat on another server. That data is retained during a reboot without requiring a backup/restore.

Quote from: pfry on July 20, 2025, 03:22:59 AMAlso, I have AMD Zen 4 (Ryzen 7000) machines (including my firewall) which periodically retrain memory on reboot, which can take several minutes (particularly since I use ECC RAM). Generally cold boots only, but not always. BIOS dependent.

I'm just using one of these mini Intel PCs and non-ECC RAM. Thus this is probably not it. But the theory is sound. Thanks for mentioning it.

> The data is on the filesystem. This makes no sense to me.

If you factor in UFS file system crashes or system recovery via install image this makes sense.

However, with large data blobs this is not really working well.  Eventually we're going to remove these backups.


Cheers,
Franco

Thanks for the reply.

What I want to know is whether I am losing my data upon reboot automatically (if there is no backup created). The help text suggests that a restore is done after every reboot. This is the point that doesn't make sense to me.

If I only lose data in case there is an issue with the filesystem or the machine itself, all is good. This is expected, if no backup exists. But in normal operation I would not expect a backup -> reboot -> restore flow.

The periodic backup is to recover data during crashes.

The backup on shutdown is to recover data for reinstalls.

Again, these have their place but do not work well if the data is larger than a few kb (ISC lease database was always one of the things being backed up historically).


Cheers,
Franco

Thanks, so I can disable the backups for RRD and Netflow and unless there's a crash or I reimage/reinstall the OS, the data won't be deleted during a reboot or when I update the firewall.

This is all I needed to know. Thank you.

I would still change the wording of the help text: This will periodically backup the RRD data so it can be restored automatically on the next boot.
This text has the connotation of backups being restored on every boot. The text should convey that a restore only happens, if the data was lost/destroyed (which doesn't happen for a simple reboot or when the system is updated).