lxd first startup is slow on arm |
|||||||
Issue descriptionOn kevin the first time we start lxd it seems to take much longer than 10 seconds and in some cases maybe longer than 30 seconds. We should figure out why
,
Jul 18
I should look closer at this for M-70
,
Jul 20
I think I found the culprit: 4096-bit RSA key generation, which happens on LXD's first startup. The math for this is pretty slow, especially on 32-bit ARM. We could: 1) Generate ECDSA certs which are much, much smaller. and/or 2) Add a config to LXD to disable TLS (and serving the REST API over TCP), since we only use the unix domain socket. Sounds like a good upstreaming candidate :)
,
Jul 20
Oh nice -- I guess option 1 wouldn't require any changes to lxd but option 2 would?
,
Jul 20
Both would require LXD changes. The cert generation code right now only does 4096-bit RSA: https://github.com/lxc/lxd/blob/2c80ee64df0f84201d2c06860a07258c7f761966/shared/cert.go#L250
,
Jul 20
> Sounds like a good upstreaming candidate :) It does indeed. :)
,
Sep 12
I'm not currently working on this, but someone knowledgeable in go should take it
,
Sep 12
,
Sep 16
Which of the two approaches are you working on? Seems to me like having the server certificate generated on-demand on the server side would be pretty easy to do and certainly something we'd be quite willing to merge upstream. Let me know if you're running into problems and please send us a PR when you have something we can look at.
,
Sep 18
I think we'd have the cert generated on-demand.
,
Oct 31
Upstream has switched to generating EC384 so I'll pick that patch instead. https://github.com/lxc/lxd/pull/5206 https://github.com/lxc/lxd/issues/5064
,
Nov 2
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/e2d64fea75409b1dae263969c483b320051c6373 commit e2d64fea75409b1dae263969c483b320051c6373 Author: Stephen Barber <smbarber@chromium.org> Date: Fri Nov 02 07:26:26 2018 app-emulation/lxd: add patch for EC384 certs BUG= chromium:837445 TEST=vm.CrostiniStartEverything Change-Id: I1b8f9b2a60e99886cb1a72c304b4a40675989df8 Reviewed-on: https://chromium-review.googlesource.com/1313770 Commit-Ready: Stephen Barber <smbarber@chromium.org> Tested-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> [add] https://crrev.com/e2d64fea75409b1dae263969c483b320051c6373/app-emulation/lxd/files/lxd-3.0.2-cert-ec384.patch [modify] https://crrev.com/e2d64fea75409b1dae263969c483b320051c6373/app-emulation/lxd/lxd-3.0.2.ebuild [rename] https://crrev.com/e2d64fea75409b1dae263969c483b320051c6373/app-emulation/lxd/lxd-3.0.2-r2.ebuild
,
Nov 5
Verified with component 11220.0.0. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by bugdroid1@chromium.org
, Apr 27 2018