Comment 2 for bug 1796137

Revision history for this message
Dan Watkins (oddbloke) wrote :

Our testing suggests that we're now seeing ~22s of first boot slowdown across all the cloud platforms. We would expect to see some slowdown in when introducing a new pre-seeded snap (as there is more work for the system to do on first-boot), but that is excessive. Furthermore, we are _also_ seeing slowdown on subsequent boots (when the cost of an extra snap should be negligible).

I'm pretty reliably seeing this 14s wait in the execution of the lxd.activate unit, both on first boot and subsequent boots, which accounts for a large part of it:

-- Logs begin at Thu 2018-10-04 20:59:47 UTC, end at Thu 2018-10-04 21:05:31 UTC. --
Oct 04 21:00:09 cosmic-test systemd[1]: Starting Service for snap application lxd.activate...
Oct 04 21:00:09 cosmic-test lxd.activate[1844]: => Starting LXD activation
Oct 04 21:00:09 cosmic-test lxd.activate[1844]: ==> Creating missing snap configuration
Oct 04 21:00:09 cosmic-test lxd.activate[1844]: ==> Loading snap configuration
Oct 04 21:00:09 cosmic-test lxd.activate[1844]: ==> Checking for socket activation support
Oct 04 21:00:09 cosmic-test lxd.activate[1844]: ==> Creating "lxd" user
Oct 04 21:00:23 cosmic-test lxd.activate[1844]: useradd: /var/lib/extrausers/passwd.1911: No such file or directory
Oct 04 21:00:23 cosmic-test lxd.activate[1844]: useradd: cannot lock /var/lib/extrausers/passwd; try again later.
Oct 04 21:00:23 cosmic-test lxd.activate[1844]: ==> Setting LXD socket ownership
Oct 04 21:00:23 cosmic-test lxd.activate[1844]: ==> Checking if LXD needs to be activated
Oct 04 21:00:24 cosmic-test systemd[1]: Started Service for snap application lxd.activate.
-- Reboot --
Oct 04 21:05:13 cosmic-test systemd[1]: Starting Service for snap application lxd.activate...
Oct 04 21:05:15 cosmic-test lxd.activate[810]: => Starting LXD activation
Oct 04 21:05:15 cosmic-test lxd.activate[810]: ==> Loading snap configuration
Oct 04 21:05:15 cosmic-test lxd.activate[810]: ==> Checking for socket activation support
Oct 04 21:05:15 cosmic-test lxd.activate[810]: ==> Creating "lxd" user
Oct 04 21:05:29 cosmic-test lxd.activate[810]: useradd: /var/lib/extrausers/passwd.911: No such file or directory
Oct 04 21:05:29 cosmic-test lxd.activate[810]: useradd: cannot lock /var/lib/extrausers/passwd; try again later.
Oct 04 21:05:29 cosmic-test lxd.activate[810]: ==> Setting LXD socket ownership
Oct 04 21:05:29 cosmic-test lxd.activate[810]: ==> Checking if LXD needs to be activated
Oct 04 21:05:30 cosmic-test systemd[1]: Started Service for snap application lxd.activate.