Boot times slow when LXD installed, due to poorly crafted systemd dependency chain

Bug #1700382 reported by David Favor on 2017-06-25
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Undecided
Unassigned

Bug Description

Notice the time spent inside lxd-containers.service + lxd.service which require network + disk subsystems to work before they can work.

This behavior can be recreated by installing + configuring LXD, with no containers.

Both lxd-containers.service + lxd.service should be run asynchronously or at end of boot process.

Boot should never hang waiting on these to finish.

Fixing this, will reduce boot time by 20secs or 10% of total boot time for this machine.
_______

net11 # 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 @1min 16.744s
└─multi-user.target @1min 16.744s
  └─lxd-containers.service @58.554s +18.188s
    └─lxd.service @1min 14.295s +2.457s
      └─network-online.target @1min 14.285s
        └─network.target @1min 14.280s
          └─<email address hidden> @55.020s
            └─network-pre.target @54.598s
              └─ebtables.service @50.416s +2.106s
                └─local-fs.target @50.212s
                  └─var-lib-lxd-devlxd.mount @1min 16.572s
                    └─local-fs-pre.target @48.449s
                      └─lvm2-monitor.service @48.004s +220ms
                        └─lvm2-lvmetad.service @46.720s
                          └─system.slice @18.745s
                            └─-.slice @2.783s

Julian Andres Klode (juliank) wrote :

What does a finished boot mean for you? It should indeed not affect time to login, but the boot time reported by systemd-analyze will always be longer even if network-online and lxd stuff is the only thing not started yet (as it considers the boot complete when all services are running).

Julian Andres Klode (juliank) wrote :

Also, well network.target is pulled in by a lot of stuff, and ifup is just slow unless you specify allow-hotplug for your interfaces; unrelated to network-online.target or lxd.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers