1 |
On Sun, Mar 9, 2014 at 10:47 AM, Marc Stürmer <mail@×××××××××××××.de> wrote: |
2 |
> Greetings fellow Gentooistas, |
3 |
|
4 |
Hi Marc. |
5 |
|
6 |
> I am looking for input on how to speed up my boot process with systemd on |
7 |
> Gentoo. |
8 |
> |
9 |
> First of one word to systemd: Gentoo is about choice, and I choose to take a |
10 |
> deeper look into systemd out of curiosity, so please respect that and don't |
11 |
> turn it into another kind of "OpenRC vs. systemd" debate. Thanks in advance. |
12 |
> |
13 |
> Having said that, now to my setup: I am running the vanilla kernel 3.13.6 |
14 |
> with only the necessary drivers builtin to the kernel, almost nothing as |
15 |
> module. |
16 |
|
17 |
I'm not sure if running with the drivers built-in speed up things. |
18 |
|
19 |
> Features I don't need are disabled. |
20 |
|
21 |
OK. |
22 |
|
23 |
> Readahead-Services are disabled. Since my root partition is XFS, fsckd is |
24 |
> disabled. |
25 |
|
26 |
OK. |
27 |
|
28 |
> systemd-analyze says: |
29 |
> |
30 |
> Startup finished in 584542y 2w 2d 20h 1min 35.953s (loader) + 1.477s |
31 |
> (kernel) + 15.966s (userspace) = 17.444s |
32 |
|
33 |
Something is wrong here; unless you are booting a 386 machine, there |
34 |
is no way it should take a minute and a half to boot. And even with a |
35 |
386 I would be suspicious. |
36 |
|
37 |
> Blame says: |
38 |
> |
39 |
> 1min 7.815s systemd-tmpfiles-clean.service |
40 |
> 4.900s NetworkManager.service |
41 |
> 3.214s systemd-logind.service |
42 |
> 2.585s lightdm.service |
43 |
> 2.373s systemd-vconsole-setup.service |
44 |
> 1.506s systemd-update-utmp.service |
45 |
> 919ms upower.service |
46 |
> 697ms polkit.service |
47 |
> 387ms systemd-udev-trigger.service |
48 |
> 381ms systemd-sysctl.service |
49 |
> 374ms tmp.mount |
50 |
> 359ms udisks2.service |
51 |
> 334ms kmod-static-nodes.service |
52 |
> 333ms user@×.service |
53 |
> 332ms systemd-user-sessions.service |
54 |
> 299ms systemd-tmpfiles-setup-dev.service |
55 |
> 288ms sys-fs-fuse-connections.mount |
56 |
> 287ms systemd-remount-fs.service |
57 |
> 228ms systemd-tmpfiles-setup.service |
58 |
> 178ms systemd-random-seed.service |
59 |
> 117ms systemd-fsck-root.service |
60 |
> 103ms systemd-journal-flush.service |
61 |
> 71ms wpa_supplicant.service |
62 |
> 65ms accounts-daemon.service |
63 |
> 51ms user@××××.service |
64 |
> 35ms systemd-udevd.service |
65 |
> 22ms alsa-restore.service |
66 |
|
67 |
Something is seriously wrong with systemd-tmpfiles-clean.service; why |
68 |
it takes 1:07 minutes to run? Do you have /tmp as a tmpfs? |
69 |
|
70 |
> Critical Chain says: |
71 |
> |
72 |
> The time after the unit is active or started is printed after the "@" |
73 |
> character. |
74 |
> The time the unit takes to start is printed after the "+" character. |
75 |
> |
76 |
> graphical.target @15.965s |
77 |
> └─multi-user.target @15.965s |
78 |
> └─NetworkManager.service @11.065s +4.900s |
79 |
> └─basic.target @11.065s |
80 |
> └─timers.target @11.064s |
81 |
> └─systemd-tmpfiles-clean.timer @11.043s |
82 |
> └─sysinit.target @4.264s |
83 |
> └─systemd-vconsole-setup.service @1.891s +2.373s |
84 |
> └─systemd-journald.socket @1.572s |
85 |
> └─-.mount @1.571s |
86 |
> └─system.slice @1.947s |
87 |
> └─-.slice @1.947s |
88 |
|
89 |
Could you run "systemd-analyze critical-chain systemd-tmpfiles-clean.service"? |
90 |
|
91 |
> Boot disk is a normal HDD SATA. |
92 |
|
93 |
When I used a HDD, my boot times where around 30 seconds. With a SDD |
94 |
now is around 12; it *makes* a big difference. I highly recommend it; |
95 |
I use a smallish 64GB drive for basically just the root filesystem. |
96 |
|
97 |
> GDM-Replacement is lightdm. |
98 |
|
99 |
Normal GNOME (including GDM) here. |
100 |
|
101 |
> So i wonder what could I do to speedup the boot process any further? |
102 |
|
103 |
In your critical-chain systemd-tmpfiles-clean.service was not included |
104 |
(only systemd-tmpfiles-clean.timer). From blame, I think that's the |
105 |
obvious offender. Again, do you have /tmp as a tmpfs? What do you have |
106 |
in /etc/tmpfiles.d? |
107 |
|
108 |
Just for comparison, my system: |
109 |
|
110 |
centurion ~ # systemd-analyze |
111 |
Startup finished in 1.469s (kernel) + 11.005s (userspace) = 12.474s |
112 |
|
113 |
centurion ~ # systemd-analyze blame |
114 |
8.944s NetworkManager-wait-online.service |
115 |
195ms systemd-fsck@dev-disk-by\x2dlabel-Files.service |
116 |
167ms NetworkManager.service |
117 |
146ms ModemManager.service |
118 |
112ms systemd-fsck@dev-disk-by\x2dlabel-Data.service |
119 |
104ms polkit.service |
120 |
92ms systemd-vconsole-setup.service |
121 |
82ms files.mount |
122 |
75ms udisks2.service |
123 |
68ms systemd-udev-trigger.service |
124 |
61ms colord.service |
125 |
49ms systemd-journal-flush.service |
126 |
46ms kmod-static-nodes.service |
127 |
46ms home-canek-Music.mount |
128 |
42ms systemd-fsck-root.service |
129 |
42ms systemd-logind.service |
130 |
40ms systemd-tmpfiles-setup.service |
131 |
40ms systemd-hostnamed.service |
132 |
40ms gdm.service |
133 |
35ms proc-sys-fs-binfmt_misc.mount |
134 |
35ms sys-kernel-debug.mount |
135 |
35ms systemd-readahead-replay.service |
136 |
35ms avahi-daemon.service |
137 |
34ms systemd-readahead-collect.service |
138 |
34ms dev-hugepages.mount |
139 |
34ms dev-mqueue.mount |
140 |
30ms systemd-remount-fs.service |
141 |
27ms systemd-tmpfiles-setup-dev.service |
142 |
24ms alsa-restore.service |
143 |
23ms home-canek-Public.mount |
144 |
20ms home-canek-Videos.mount |
145 |
20ms bluetooth.service |
146 |
20ms systemd-modules-load.service |
147 |
17ms wine-executables.service |
148 |
17ms accounts-daemon.service |
149 |
16ms systemd-random-seed.service |
150 |
16ms home-canek-Documents.mount |
151 |
15ms user@××××.service |
152 |
15ms systemd-user-sessions.service |
153 |
14ms data.mount |
154 |
14ms user@×.service |
155 |
13ms systemd-sysctl.service |
156 |
12ms user@×××.service |
157 |
11ms dev-disk-by\x2dlabel-Swap.swap |
158 |
11ms home-canek-Templates.mount |
159 |
10ms var-lock.mount |
160 |
9ms home-canek-Devel.mount |
161 |
7ms sshd.service |
162 |
7ms systemd-update-utmp.service |
163 |
6ms home-canek-Pictures.mount |
164 |
5ms var-run.mount |
165 |
4ms wpa_supplicant.service |
166 |
4ms upower.service |
167 |
3ms gentoo-local-baselayout1.service |
168 |
3ms tmp.mount |
169 |
2ms systemd-udevd.service |
170 |
2ms sys-fs-fuse-connections.mount |
171 |
2ms rtkit-daemon.service |
172 |
2ms usr-portage-distfiles.mount |
173 |
2ms home-canek-Downloads.mount |
174 |
1ms systemd-readahead-done.service |
175 |
|
176 |
centurion ~ # systemd-analyze critical-chain |
177 |
The time after the unit is active or started is printed after the "@" character. |
178 |
The time the unit takes to start is printed after the "+" character. |
179 |
|
180 |
graphical.target @10.997s |
181 |
└─multi-user.target @10.996s |
182 |
└─sshd.service @10.988s +7ms |
183 |
└─network.target @10.987s |
184 |
└─NetworkManager.service @1.875s +167ms |
185 |
└─basic.target @1.874s |
186 |
└─timers.target @1.872s |
187 |
└─systemd-tmpfiles-clean.timer @1.871s |
188 |
└─sysinit.target @934ms |
189 |
└─swap.target @934ms |
190 |
└─dev-disk-by\x2dlabel-Swap.swap @923ms +11ms |
191 |
└─dev-disk-by\x2dlabel-Swap.device @923ms |
192 |
|
193 |
Notice that systemd-tmpfiles-clean.service takes almost no time; here |
194 |
it's its critical chain: |
195 |
|
196 |
centurion ~ # systemd-analyze critical-chain systemd-tmpfiles-clean.service |
197 |
The time after the unit is active or started is printed after the "@" character. |
198 |
The time the unit takes to start is printed after the "+" character. |
199 |
|
200 |
└─systemd-tmpfiles-clean.timer @1.871s |
201 |
└─sysinit.target @934ms |
202 |
└─swap.target @934ms |
203 |
└─dev-disk-by\x2dlabel-Swap.swap @923ms +11ms |
204 |
└─dev-disk-by\x2dlabel-Swap.device @923ms |
205 |
|
206 |
Regards. |
207 |
-- |
208 |
Canek Peláez Valdés |
209 |
Posgrado en Ciencia e Ingeniería de la Computación |
210 |
Universidad Nacional Autónoma de México |