Skip to content

recipes-connectivity: disable NetworkManager-wait-online.service#341

Closed
DaizhuangBai wants to merge 1 commit into
qualcomm-linux:wrynosefrom
DaizhuangBai:avoid_enabling_wait-online_at_boot
Closed

recipes-connectivity: disable NetworkManager-wait-online.service#341
DaizhuangBai wants to merge 1 commit into
qualcomm-linux:wrynosefrom
DaizhuangBai:avoid_enabling_wait-online_at_boot

Conversation

@DaizhuangBai

Copy link
Copy Markdown

Introduce a networkmanager bbappend to disable NetworkManager-wait- online.service.

NetworkManager-wait-online.service is auto-enabled via the "Also=" install hook in NetworkManager.service. However, it blocks startup and significantly increases boot time. Multiple targets have reported this issue, such as iq-615-evk and iq-8275-evk. Remove the install hook during do_install so wait-online is not enabled by default.

Measured boot time improvement on iq-615-evk target:

  • before: ~28s
  • after: ~18s

Introduce a networkmanager bbappend to disable NetworkManager-wait-
online.service.

NetworkManager-wait-online.service is auto-enabled via the "Also="
install hook in NetworkManager.service. However, it blocks startup
and significantly increases boot time. Multiple targets have reported
this issue, such as iq-615-evk and iq-8275-evk. Remove the install
hook during do_install so wait-online is not enabled by default.

Measured boot time improvement on iq-615-evk target:
- before: ~28s
- after:  ~18s

Signed-off-by: Daizhuang Bai <daizhuang.bai@oss.qualcomm.com>
@ricardosalveti

Copy link
Copy Markdown
Contributor

Can you please upload the bootchart so we can evaluate the services that are getting blocked?

# NetworkManager-wait-online.service has WantedBy=network-online.target,
# so enabling it only has an effect if network-online.target itself is
# enabled or pulled in by some other unit.
Also=NetworkManager-wait-online.service

We need a better understanding of the boot flow, because it could as well just be working as expected (services that require network-online.target should indeed wait for a network).

@DaizhuangBai

Copy link
Copy Markdown
Author

blame.txt
boot
critical-chain.txt

From the bootup log, there are actually some services that require network-online.target, such as the following:
aktualizr.service
mosquitto.service
rsyslog.service
docker.service

But these services can retry to get network after device bootup, so I think there is no effect on them if we disable NetworkManager-wait-online.service

I have raised another PR to merge into main, so close this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants