Re: [systemd-devel] Help needed for optimizing my boot time
On 11.06.2015 16:54, Francis Moreau wrote: On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. If disabling it does ot help, you can try masking it (systemctl mask) for a test. Masking this service helps: $ systemd-analyze Startup finished in 3.323s (firmware) + 6.795s (loader) + 8.342s (kernel) + 1.470s (userspace) = 19.932s $ 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 @1.470s multi-user.target @1.470s autofs.service @1.024s +445ms network-online.target @1.023s network.target @1.021s NetworkManager.service @731ms +289ms basic.target @731ms and the system seems to run fine (specially autofs, ntpd). But I think the time given by systemd-analyze (1.470s) is not correct. When booting I can see that the userspace is doing a fsck on root which takes more than 2s. And the login screen takes at least 5s to appear once the fsck is starting. Is the time spent in initrd is included in userspace ? Well, seems like systemd is not running in the initrd, so it's accounted to kernel, which seems possible seeing 8.342s spent there. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
В Fri, 12 Jun 2015 16:56:08 +0200 Francis Moreau francis.m...@gmail.com пишет: On 06/11/2015 06:23 PM, Dan Williams wrote: On Thu, 2015-06-11 at 15:15 +0200, Francis Moreau wrote: [...] Does ntpd service really need 'After=network.target', not sure. The 'network online' targets are really just there for ignorant services that don't respond to network events themselves, that expect the network to be up and running before they start. Of course, those services don't have any way to say *which* network interface they care about, so if you have more than one interface in your system they still get it wrong. Do such services exist actually ? Until recently ntpd required working name resolution (i.e. often DNS) to find its peers. If you mount something over network on boot you want to have reasonable confidence that network is up. I can't see how such service can work if they can't handle the offline case properly... Please explain how filesystem on iSCSI target is supposed to handle offline case properly. BTW 'network online' target doesn't seem to mean the network is up because if I boot my computer offline, this target is still reached and passed. Yes, network-online.target is not there to make boot impossible; it is there to delay boot until network is considered to be up. It makes little sense in pure dynamic environment; it is quite useful in static server environment where network is expected to be always present but may take some time to be configured. But anyway, if ntpd or autofs can respond to network events using netlink or listening on D-Bus to NetworkManager/connman/etc or getting triggered by eg NetworkManager dispatcher scripts, then they probably don't need to block on network-online. But if they can't, and they expect the network to be up and running before they start, then yes they will block startup until some kind of networking is running. Well I must be missing something but I can't see why ntpd or autofs would rely and have any deps on NM whereas they need to deal with the generic case, i.e. the one where NM is not installed and used. Where do you see any deps on NM? network-online.target is generic target which will be used with any underlying networking implementation. IOW, any services having After: network-online.target look odd to me. Welcome to real world :) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On 06/11/2015 06:23 PM, Dan Williams wrote: On Thu, 2015-06-11 at 15:15 +0200, Francis Moreau wrote: [...] Does ntpd service really need 'After=network.target', not sure. The 'network online' targets are really just there for ignorant services that don't respond to network events themselves, that expect the network to be up and running before they start. Of course, those services don't have any way to say *which* network interface they care about, so if you have more than one interface in your system they still get it wrong. Do such services exist actually ? I can't see how such service can work if they can't handle the offline case properly... BTW 'network online' target doesn't seem to mean the network is up because if I boot my computer offline, this target is still reached and passed. But anyway, if ntpd or autofs can respond to network events using netlink or listening on D-Bus to NetworkManager/connman/etc or getting triggered by eg NetworkManager dispatcher scripts, then they probably don't need to block on network-online. But if they can't, and they expect the network to be up and running before they start, then yes they will block startup until some kind of networking is running. Well I must be missing something but I can't see why ntpd or autofs would rely and have any deps on NM whereas they need to deal with the generic case, i.e. the one where NM is not installed and used. In my understanding, they would either use netlink or simply retry later. I just checked ntpd source code and it seems to use netlink. I can't find any ntpd script installed in /etc/NetworkManager/dispatcher.d but ntpd get informed when an network interface is added/removed. IOW, any services having After: network-online.target look odd to me. Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On 06/12/2015 06:26 PM, Andrei Borzenkov wrote: В Fri, 12 Jun 2015 16:56:08 +0200 Francis Moreau francis.m...@gmail.com пишет: On 06/11/2015 06:23 PM, Dan Williams wrote: On Thu, 2015-06-11 at 15:15 +0200, Francis Moreau wrote: [...] Does ntpd service really need 'After=network.target', not sure. The 'network online' targets are really just there for ignorant services that don't respond to network events themselves, that expect the network to be up and running before they start. Of course, those services don't have any way to say *which* network interface they care about, so if you have more than one interface in your system they still get it wrong. Do such services exist actually ? Until recently ntpd required working name resolution (i.e. often DNS) to find its peers. If you mount something over network on boot you want to have reasonable confidence that network is up. I can't see how such service can work if they can't handle the offline case properly... Please explain how filesystem on iSCSI target is supposed to handle offline case properly. I was talking about ntpd, I dont know for you specific case. BTW 'network online' target doesn't seem to mean the network is up because if I boot my computer offline, this target is still reached and passed. Yes, network-online.target is not there to make boot impossible; it is there to delay boot until network is considered to be up. It makes little sense in pure dynamic environment; it is quite useful in static server environment where network is expected to be always present but may take some time to be configured. Then if it's not reliable in some cases how can it be used by some generic services such as ntpd if ntpd is not prepared to handle the offline case ? But anyway, if ntpd or autofs can respond to network events using netlink or listening on D-Bus to NetworkManager/connman/etc or getting triggered by eg NetworkManager dispatcher scripts, then they probably don't need to block on network-online. But if they can't, and they expect the network to be up and running before they start, then yes they will block startup until some kind of networking is running. Well I must be missing something but I can't see why ntpd or autofs would rely and have any deps on NM whereas they need to deal with the generic case, i.e. the one where NM is not installed and used. Where do you see any deps on NM? network-online.target is generic target which will be used with any underlying networking implementation. I was refering to if ntpd or autofs can respond to network events using netlink or listening on D-Bus to NetworkManager/connman/etc IOW, any services having After: network-online.target look odd to me. Welcome to real world :) No, real world is not wait for ntpd, autofs to be activated before I can login or at least not in my world ;) I don't really understand your opinion, are you saying that ntpd should used After: network-online.target ? Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. If disabling it does ot help, you can try masking it (systemctl mask) for a test. OTOH disabled here just means links in [Install] section are not present. Could you show sysmectl show NetworkManager-wait-online.service -p WantedBy -p RequiredBy ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Help needed for optimizing my boot time
Hello, I'm interested in optimizing my boot time on my laptop. So I looked at the big picture first: $ systemd-analyze Startup finished in 3.994s (firmware) + 7.866s (loader) + 8.226s (kernel) + 7.921s (userspace) = 28.007s and noticed that the boot time spent in userspace is quite high. I looked at the details: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... If I understand that correctly, NetworkManager takes more than 7 seconds to start and seems to be the culprit. However, I'm not sure to understand why the service following NM (autofs) and thus multi-user.target need to wait for the network to be available. Specially since: - nothing requires a network connection in order to boot and setup my system, including mounting /home partition - autofs should still be working if there's no network connection and detect if the network becomes ready later So my question is: in this case, is autofs wrongly waiting for the network to be started or is NM taking too much time to start ? Thanks. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
Hi, On 06/11/2015 12:44 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 1:08 PM, Francis Moreau francis.m...@gmail.com wrote: Hello, I'm interested in optimizing my boot time on my laptop. So I looked at the big picture first: $ systemd-analyze Startup finished in 3.994s (firmware) + 7.866s (loader) + 8.226s (kernel) + 7.921s (userspace) = 28.007s and noticed that the boot time spent in userspace is quite high. I looked at the details: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... If I understand that correctly, NetworkManager takes more than 7 seconds to start and seems to be the culprit. However, I'm not sure to understand why the service following NM (autofs) and thus multi-user.target need to wait for the network to be available. Specially since: - nothing requires a network connection in order to boot and setup my system, including mounting /home partition - autofs should still be working if there's no network connection and detect if the network becomes ready later So my question is: in this case, is autofs wrongly waiting for the network to be started or is NM taking too much time to start ? Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On Thu, Jun 11, 2015 at 1:08 PM, Francis Moreau francis.m...@gmail.com wrote: Hello, I'm interested in optimizing my boot time on my laptop. So I looked at the big picture first: $ systemd-analyze Startup finished in 3.994s (firmware) + 7.866s (loader) + 8.226s (kernel) + 7.921s (userspace) = 28.007s and noticed that the boot time spent in userspace is quite high. I looked at the details: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... If I understand that correctly, NetworkManager takes more than 7 seconds to start and seems to be the culprit. However, I'm not sure to understand why the service following NM (autofs) and thus multi-user.target need to wait for the network to be available. Specially since: - nothing requires a network connection in order to boot and setup my system, including mounting /home partition - autofs should still be working if there's no network connection and detect if the network becomes ready later So my question is: in this case, is autofs wrongly waiting for the network to be started or is NM taking too much time to start ? Is NetworkManager-wait-online.service enabled and active? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. If disabling it does ot help, you can try masking it (systemctl mask) for a test. Masking this service helps: $ systemd-analyze Startup finished in 3.323s (firmware) + 6.795s (loader) + 8.342s (kernel) + 1.470s (userspace) = 19.932s $ 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 @1.470s multi-user.target @1.470s autofs.service @1.024s +445ms network-online.target @1.023s network.target @1.021s NetworkManager.service @731ms +289ms basic.target @731ms and the system seems to run fine (specially autofs, ntpd). But I think the time given by systemd-analyze (1.470s) is not correct. When booting I can see that the userspace is doing a fsck on root which takes more than 2s. And the login screen takes at least 5s to appear once the fsck is starting. Is the time spent in initrd is included in userspace ? Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On Thu, 2015-06-11 at 15:15 +0200, Francis Moreau wrote: On 06/11/2015 02:22 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 3:10 PM, Francis Moreau francis.m...@gmail.com wrote: On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. I think it runs because of this: $ ls /usr/lib/systemd/system/network-online.target.wants/ NetworkManager-wait-online.service BTW, why isn't it showed by 'systemd-analyze critical-chain' ? My best guess is that it has no direct dependency on NetworkManager so it is not counted as part of chain. You could try adding After=NetworkManager.service to see if it changes anything in systemd-analyze output. If disabling it does ot help, you can try masking it (systemctl mask) for a test. Actually, I'm still not sure why autofs.service is waiting for network-online.target to be activated, IOW why this service has 'After=network-online.target'. You can discuss it on autofs list; systemd is just a messenger here :) Well it's more a systemd configuration question. I think the 'After=network-online.target' in its service file is not really needed. I tried to disable autofs service and got a similar issue with ntpd one (except network-online.target is not involved here): $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s ntpd.service @7.790s +20ms network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms $ systemctl show ntpd -p After After=network.target... Does ntpd service really need 'After=network.target', not sure. The 'network online' targets are really just there for ignorant services that don't respond to network events themselves, that expect the network to be up and running before they start. Of course, those services don't have any way to say *which* network interface they care about, so if you have more than one interface in your system they still get it wrong. But anyway, if ntpd or autofs can respond to network events using netlink or listening on D-Bus to NetworkManager/connman/etc or getting triggered by eg NetworkManager dispatcher scripts, then they probably don't need to block on network-online. But if they can't, and they expect the network to be up and running before they start, then yes they will block startup until some kind of networking is running. Dan ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On Thu, Jun 11, 2015 at 3:10 PM, Francis Moreau francis.m...@gmail.com wrote: On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. I think it runs because of this: $ ls /usr/lib/systemd/system/network-online.target.wants/ NetworkManager-wait-online.service BTW, why isn't it showed by 'systemd-analyze critical-chain' ? My best guess is that it has no direct dependency on NetworkManager so it is not counted as part of chain. You could try adding After=NetworkManager.service to see if it changes anything in systemd-analyze output. If disabling it does ot help, you can try masking it (systemctl mask) for a test. Actually, I'm still not sure why autofs.service is waiting for network-online.target to be activated, IOW why this service has 'After=network-online.target'. You can discuss it on autofs list; systemd is just a messenger here :) ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On 06/11/2015 02:22 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 3:10 PM, Francis Moreau francis.m...@gmail.com wrote: On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. I think it runs because of this: $ ls /usr/lib/systemd/system/network-online.target.wants/ NetworkManager-wait-online.service BTW, why isn't it showed by 'systemd-analyze critical-chain' ? My best guess is that it has no direct dependency on NetworkManager so it is not counted as part of chain. You could try adding After=NetworkManager.service to see if it changes anything in systemd-analyze output. If disabling it does ot help, you can try masking it (systemctl mask) for a test. Actually, I'm still not sure why autofs.service is waiting for network-online.target to be activated, IOW why this service has 'After=network-online.target'. You can discuss it on autofs list; systemd is just a messenger here :) Well it's more a systemd configuration question. I think the 'After=network-online.target' in its service file is not really needed. I tried to disable autofs service and got a similar issue with ntpd one (except network-online.target is not involved here): $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s ntpd.service @7.790s +20ms network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms $ systemctl show ntpd -p After After=network.target... Does ntpd service really need 'After=network.target', not sure. Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Help needed for optimizing my boot time
On 06/11/2015 01:40 PM, Andrei Borzenkov wrote: On Thu, Jun 11, 2015 at 2:26 PM, Francis Moreau francis.m...@gmail.com wrote: $ systemd-analyze critical-chain graphical.target @7.921s multi-user.target @7.921s autofs.service @7.787s +132ms network-online.target @7.786s network.target @7.786s NetworkManager.service @675ms +184ms basic.target @674ms ... ... Is NetworkManager-wait-online.service enabled and active? It seems it's enabled but no more active: $ systemctl status NetworkManager-wait-online.service ● NetworkManager-wait-online.service - Network Manager Wait Online Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-06-11 11:54:37 CEST; 1h 4min ago Process: 583 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited, status=0/SUCCESS) Main PID: 583 (code=exited, status=0/SUCCESS) Jun 11 11:54:30 cyclone systemd[1]: Starting Network Manager Wait Online... Jun 11 11:54:37 cyclone systemd[1]: Started Network Manager Wait Online. This seems correct to me, doesn't it ? Actually it says disabled which makes me wonder why it run. But this is the service that is likely responsible for long time you observe. I think it runs because of this: $ ls /usr/lib/systemd/system/network-online.target.wants/ NetworkManager-wait-online.service BTW, why isn't it showed by 'systemd-analyze critical-chain' ? If disabling it does ot help, you can try masking it (systemctl mask) for a test. Actually, I'm still not sure why autofs.service is waiting for network-online.target to be activated, IOW why this service has 'After=network-online.target'. OTOH disabled here just means links in [Install] section are not present. $ cat /usr/lib/systemd/system/NetworkManager-wait-online.service ... [Install] WantedBy=multi-user.target and I can't find the corresponding symlink in /usr/lib/systemd/system/multi-user.target.wants/ or /etc/systemd/system/multi-user.target.wants/ So you seem right, and disabled seems a bit mis-leading here. Could you show sysmectl show NetworkManager-wait-online.service -p WantedBy -p RequiredBy $ systemctl show NetworkManager-wait-online.service -p WantedBy -p RequiredBy RequiredBy= WantedBy=network-online.target Thanks ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel