Best tweaks for reboot speed increase?

I have a VERY large system so Im running a dell optiplex 7050 i7 @3.6ghz running a M.2 NVMe (speed is the key not memory) and am getting reboot times going UPWARDS from 43s to 50+ seconds

I have just moved over my database to MariaDB on my Synology NAS in order to lower my reboot times and unfortunately my reboot times have consistently gone up over multiple reboots (recorder service is now at 15s) so im guessing that a M.2 NVMe (PCIe) makes putting the database on the network slower.

So with that in mind - What sort of “streamlining” other than moving the DB off the HA hardware have people done to improve reboot times?

What do you consider a VERY large system? I have 60+ zigbee devices, about 40 z-wave and 50 intergrations loads of automations, both native and with pyscript. I use a sqlite db on the virtual disk inside the vm, nothing fancy.

Go to Settings > System > System Health. Scroll down to see which integrations take the longest to set up. They are ordered by slowest first.

I have an i7-1165G7 NUC. And a few things to get going:

Dev tools:

{%- for d in states | groupby('domain') %}
{{ d[0] }}: {{ states[d[0]] | count  }}
{%- endfor %}


alarm_control_panel: 1
automation: 299
binary_sensor: 250
button: 11
calendar: 1
camera: 20
climate: 3
device_tracker: 2
group: 10
input_boolean: 60
input_datetime: 27
input_number: 59
input_select: 10
light: 87
lock: 2
media_player: 12
number: 16
remote: 2
scene: 60
script: 169
select: 22
sensor: 642 ### O_o I'm not obsessed. Really. 
sun: 1
switch: 132
update: 16
utility_meter: 13
vacuum: 2
weather: 3
zone: 1

This takes about 70 to 75 seconds to restart. Mainly due to this third party integration :angry:


The developer reckons there’s nothing they can do about it. It would be 20-30 seconds otherwise.

Here its “group” that takes more then 70seconds haha

That is probably because it depends on some other integration to set up first to provide the group members.

1 Like

best tweak I found is closing the HA window in a browser, and wait for it to be active again…

on my py, that took more than 1 full minute from the 4 minutes.
currently on a mini-pc and restarting in 1.5 - 2 minutes. NVMe not yet used.

other than that, check How to install Py spy on a HA OS instance, please instruct - #8 by bdraco where I reported slow timings, struggled to install py-spy but did some profilers, and Nick (bdraco) announces some of the more effective ‘tweaks’…

got py-spy to run and that further enhanced Nicks tweaking. Not all are merged, but he’s on a roll, and we can expect serious progress

my top listing is

now, which is a huge speedup compared to where I was 1 week ago.

(mini pc using 2 watts most of the time… :wink: )

I have got 110 Zigbee devices, close to 80 automations and over 100 scenes


Thx for the script.


automation: 85
binary_sensor: 138
button: 24
camera: 4
climate: 7
cover: 7
device_tracker: 12
input_boolean: 220
input_button: 2
input_datetime: 27
input_text: 1
light: 214
media_player: 27
number: 37
persistent_notification: 2
person: 4
remote: 6
scene: 199
script: 197
select: 57
sensor: 414
setter: 1
sun: 1
switch: 68
update: 35
zone: 9