Siduction Forum
Siduction Forum => Experimental => Topic started by: timc on 2014/02/01, 14:37:33
-
I have been having trouble for weeks with very slow boot up times. Last evening, I reapproached the problem. Systemd-analyze timed a boot up at 83 seconds.
I discovered that, although I had disabled network-manager in systemd, dbus was spending time looking for it. I could not find a "clean" way to prevent this, so I renamed the dbus service files in /user/share/dbus-1/system-services for network-manager and modem-manager. The next bootup was down to 44 seconds.
Then, I found that Avahi-daemon was taking a long time to start, so I disabled it in systemd. Now, my bootup is down to 23 sec. Much, much better.
Does anyone know the proper way to disable the dbus system services? I'm sure that renaming their service files is not the correct way.
Tim
-
I think you have a choice, example
systemctl stop dbus.service
*Should* work
Other dbus-services would be
dbus-org.freedesktop.Avahi.service
dbus-org.freedesktop.hostname1.service
dbus-org.freedesktop.locale1.service
dbus-org.freedesktop.login1.service
dbus-org.freedesktop.timedate1.service
You can probably use
systemctl list-unit-files
to see what's going on.
To see if dbus is enabled, try
systemctl is-enabled dbus.service
or if needed to start at bootup
systemctl enable dbus.service
To see if any failed units
systemctl --failed
-
Mine is ok, for a workstation with a lot of stuff. That is OCZ Vertex 3 SSDs
Startup finished in 12.432s (kernel) + 7.287s (userspace) = 19.720s
greetz
devil
-
Thank you, piper. systemctl has a lot of depth to the things it handles.
Tim
-
I, for one, welcome our new systemd overlords. :)
Thanks for mentioning systemd-analyze, timc. I learn new things every day.
Guess my system doesn't have a lot of stuff yet. OCZ Vertex 2.
Startup finished in 3.742s (kernel) + 7.600s (userspace) = 11.343s
-
here is some more reading on optimizing boot times:
http://freedesktop.org/wiki/Software/systemd/Optimizations/ (http://freedesktop.org/wiki/Software/systemd/Optimizations/)
Besides that, the manpage to systemd-analyze has some more clues.
systemd-analyze blame
shows where there is room for optimization. On my notebook ntp took forever (> 30s). Now it is gone.
Bootcharts can be visualized by: systemd-analyze plot > plot.svg; inkscape plot.svg
Of course inkscape needs to be installed, works with konqueror as well. Have fun playing around, there is much more.
greetz
devil
-
devil, you can also just open those .svg plots in a web browser.
So, here is where things have progressed since my last report:
1) Disabled cron, mdadm, and preload services.
2) Discovered that, even though I have not been running network-manager for weeks, nm-applet was still being started. Found and moved nm-applet.desktop to stop this.
3) Disabled ssh
4 Purged package pywwetha
Then I discovered a usbmount bug (Debian bug 658028). agaida helped me find file /etc/umount/umount.conf, which I edited to say "ENABLED=0".
I think things are optimized pretty well, at least until I go digging some more. My bootup is now down to 17-18 seconds.
Tim
-
The stuff I read pointed to /run/log and file:///run/log/ as the URL, but /run/log just stays empty here. So far no clue where the stuff really goes and not enough time ...… :(
greetz
devil
-
systemctl mask seems to be an effective way to disable services and is reversible with unmask eg. -
systemctl mask lvm2-activation.service
Result with ntp and lvm related services masked:
Startup finished in 3.542s (kernel) + 3.724s (userspace) = 7.266s