On Sun, Mar 9, 2014 at 10:47 AM, Marc Stürmer <m...@marc-stuermer.de> wrote: > Greetings fellow Gentooistas,
Hi Marc. > I am looking for input on how to speed up my boot process with systemd on > Gentoo. > > First of one word to systemd: Gentoo is about choice, and I choose to take a > deeper look into systemd out of curiosity, so please respect that and don't > turn it into another kind of "OpenRC vs. systemd" debate. Thanks in advance. > > Having said that, now to my setup: I am running the vanilla kernel 3.13.6 > with only the necessary drivers builtin to the kernel, almost nothing as > module. I'm not sure if running with the drivers built-in speed up things. > Features I don't need are disabled. OK. > Readahead-Services are disabled. Since my root partition is XFS, fsckd is > disabled. OK. > systemd-analyze says: > > Startup finished in 584542y 2w 2d 20h 1min 35.953s (loader) + 1.477s > (kernel) + 15.966s (userspace) = 17.444s Something is wrong here; unless you are booting a 386 machine, there is no way it should take a minute and a half to boot. And even with a 386 I would be suspicious. > Blame says: > > 1min 7.815s systemd-tmpfiles-clean.service > 4.900s NetworkManager.service > 3.214s systemd-logind.service > 2.585s lightdm.service > 2.373s systemd-vconsole-setup.service > 1.506s systemd-update-utmp.service > 919ms upower.service > 697ms polkit.service > 387ms systemd-udev-trigger.service > 381ms systemd-sysctl.service > 374ms tmp.mount > 359ms udisks2.service > 334ms kmod-static-nodes.service > 333ms user@0.service > 332ms systemd-user-sessions.service > 299ms systemd-tmpfiles-setup-dev.service > 288ms sys-fs-fuse-connections.mount > 287ms systemd-remount-fs.service > 228ms systemd-tmpfiles-setup.service > 178ms systemd-random-seed.service > 117ms systemd-fsck-root.service > 103ms systemd-journal-flush.service > 71ms wpa_supplicant.service > 65ms accounts-daemon.service > 51ms user@1000.service > 35ms systemd-udevd.service > 22ms alsa-restore.service Something is seriously wrong with systemd-tmpfiles-clean.service; why it takes 1:07 minutes to run? Do you have /tmp as a tmpfs? > Critical Chain says: > > The time after the unit is active or started is printed after the "@" > character. > The time the unit takes to start is printed after the "+" character. > > graphical.target @15.965s > └─multi-user.target @15.965s > └─NetworkManager.service @11.065s +4.900s > └─basic.target @11.065s > └─timers.target @11.064s > └─systemd-tmpfiles-clean.timer @11.043s > └─sysinit.target @4.264s > └─systemd-vconsole-setup.service @1.891s +2.373s > └─systemd-journald.socket @1.572s > └─-.mount @1.571s > └─system.slice @1.947s > └─-.slice @1.947s Could you run "systemd-analyze critical-chain systemd-tmpfiles-clean.service"? > Boot disk is a normal HDD SATA. When I used a HDD, my boot times where around 30 seconds. With a SDD now is around 12; it *makes* a big difference. I highly recommend it; I use a smallish 64GB drive for basically just the root filesystem. > GDM-Replacement is lightdm. Normal GNOME (including GDM) here. > So i wonder what could I do to speedup the boot process any further? In your critical-chain systemd-tmpfiles-clean.service was not included (only systemd-tmpfiles-clean.timer). From blame, I think that's the obvious offender. Again, do you have /tmp as a tmpfs? What do you have in /etc/tmpfiles.d? Just for comparison, my system: centurion ~ # systemd-analyze Startup finished in 1.469s (kernel) + 11.005s (userspace) = 12.474s centurion ~ # systemd-analyze blame 8.944s NetworkManager-wait-online.service 195ms systemd-fsck@dev-disk-by\x2dlabel-Files.service 167ms NetworkManager.service 146ms ModemManager.service 112ms systemd-fsck@dev-disk-by\x2dlabel-Data.service 104ms polkit.service 92ms systemd-vconsole-setup.service 82ms files.mount 75ms udisks2.service 68ms systemd-udev-trigger.service 61ms colord.service 49ms systemd-journal-flush.service 46ms kmod-static-nodes.service 46ms home-canek-Music.mount 42ms systemd-fsck-root.service 42ms systemd-logind.service 40ms systemd-tmpfiles-setup.service 40ms systemd-hostnamed.service 40ms gdm.service 35ms proc-sys-fs-binfmt_misc.mount 35ms sys-kernel-debug.mount 35ms systemd-readahead-replay.service 35ms avahi-daemon.service 34ms systemd-readahead-collect.service 34ms dev-hugepages.mount 34ms dev-mqueue.mount 30ms systemd-remount-fs.service 27ms systemd-tmpfiles-setup-dev.service 24ms alsa-restore.service 23ms home-canek-Public.mount 20ms home-canek-Videos.mount 20ms bluetooth.service 20ms systemd-modules-load.service 17ms wine-executables.service 17ms accounts-daemon.service 16ms systemd-random-seed.service 16ms home-canek-Documents.mount 15ms user@1000.service 15ms systemd-user-sessions.service 14ms data.mount 14ms user@0.service 13ms systemd-sysctl.service 12ms user@117.service 11ms dev-disk-by\x2dlabel-Swap.swap 11ms home-canek-Templates.mount 10ms var-lock.mount 9ms home-canek-Devel.mount 7ms sshd.service 7ms systemd-update-utmp.service 6ms home-canek-Pictures.mount 5ms var-run.mount 4ms wpa_supplicant.service 4ms upower.service 3ms gentoo-local-baselayout1.service 3ms tmp.mount 2ms systemd-udevd.service 2ms sys-fs-fuse-connections.mount 2ms rtkit-daemon.service 2ms usr-portage-distfiles.mount 2ms home-canek-Downloads.mount 1ms systemd-readahead-done.service centurion ~ # systemd-analyze critical-chain The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. graphical.target @10.997s └─multi-user.target @10.996s └─sshd.service @10.988s +7ms └─network.target @10.987s └─NetworkManager.service @1.875s +167ms └─basic.target @1.874s └─timers.target @1.872s └─systemd-tmpfiles-clean.timer @1.871s └─sysinit.target @934ms └─swap.target @934ms └─dev-disk-by\x2dlabel-Swap.swap @923ms +11ms └─dev-disk-by\x2dlabel-Swap.device @923ms Notice that systemd-tmpfiles-clean.service takes almost no time; here it's its critical chain: centurion ~ # systemd-analyze critical-chain systemd-tmpfiles-clean.service The time after the unit is active or started is printed after the "@" character. The time the unit takes to start is printed after the "+" character. └─systemd-tmpfiles-clean.timer @1.871s └─sysinit.target @934ms └─swap.target @934ms └─dev-disk-by\x2dlabel-Swap.swap @923ms +11ms └─dev-disk-by\x2dlabel-Swap.device @923ms Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México