New issue
Advanced search Search tips

Issue 906804 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Crostini: improve logout time when containers are enabled

Project Member Reported by avkodipelli@chromium.org, Nov 19

Issue description

Chrome Version:  72.0.3612.0
Chrome OS Version: 11276.0.0 
Chrome OS Platform: Eve
Network info: WiFi

Please specify Cr-* of the system to which this bug/feature applies (add
the label below).

Steps To Reproduce:
(1) Install linux and observe terminal opened.
(2) Logout device
(3) Observe time taking for logout

Expected Result:
- Logout time same as without linux(around 5 or less). 

Actual Result:
- It is taking too long. Around 15 to 18 seconds.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
Always

Please check below observation video.
Feedback report :https://listnr.corp.google.com/report/85796875073
 
Cc: cywang@chromium.org
+Chung-yih, this can be a good performance test candidate if we are not tracking this already.
Summary: Crostini: improve logout time when containers are enabled (was: Crostini: Logout time is more when linux installed)
there's always going to be overhead when we have containers/VMs running.  expecting it to be zero overhead is unreasonable (unless you don't care about losing data?).
True, a performance test will help to ensure that we don't regress.
Cc: jkardatzke@chromium.org
Labels: -M-72 M-73
Owner: chirantan@chromium.org
Status: Assigned (was: Untriaged)
I'd guess there is a lot of low hanging fruit here. If there has been a lot of disk IO it's going to take a while to sync it all. However the common case feels like it should be much faster than it currently is.

chirantan, any ideas about the concierge/maitred or ciccerone/garcon shutdown process that might be taking a while to complete?
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tremplin/+/a8e30c1592f745d08c2347da2d9c517e1862aeaa

commit a8e30c1592f745d08c2347da2d9c517e1862aeaa
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Sat Dec 01 09:08:40 2018

Change shutdown timeout to 9 seconds

The systemd version in debian stretch appears to have a bug where it
doesn't exit even after being sent a signal to shut down the container.
As a result, lxd waits for the full default timeout before force killing
every process left.

We can't do much about systemd but we can improve things somewhat by
lowering lxd's timeout to 9 seconds.  maitred's shut down timeout is 10
seconds so making lxd's timeout 9 seconds ensures that it will exit in
time.

BUG=chromium:906804
TEST=concierge_client --stop_all

Change-Id: I1eaf5cadb91ae83e506ba5765a10e8d82d2be101
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1357249
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/a8e30c1592f745d08c2347da2d9c517e1862aeaa/src/chromiumos/tremplin/main.go

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/d79ed8b4d7f4b29d65e2a96bc422fe943636c5f3

commit d79ed8b4d7f4b29d65e2a96bc422fe943636c5f3
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Sun Dec 02 05:19:16 2018

vm_tools: maitred: Send SIGPWR to lxd on shutdown

lxd treats SIGPWR as a signal that the system is going to lose power and
that it should shut down all containers and exit.  Send SIGPWR to lxd
before sending SIGTERM to all other processes during shutdown.

This will not improve things much for the stretch container due to an
issue with systemd but it should make shutdown for all other types of
containers much faster.

BUG=chromium:906804
TEST=concierge_client --stop_all

Change-Id: I79d0f618c7c0dc24a16d9d5fc7e7259acaa71f4a
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1357643
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/d79ed8b4d7f4b29d65e2a96bc422fe943636c5f3/vm_tools/maitred/init.cc

Due to a bug in the systemd version in debian stretch we will have to wait for the full lxd shutdown timeout every time we log out.  The change in #5 lowered this timeout to 9 seconds.  The upgrade to buster should make things much faster but I'm not sure there is a lot more we can do about this right now.

Sign in to add a comment