New issue
Advanced search Search tips

Issue 919620 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 15
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Measure Crostini syscall overhead

Project Member Reported by cylee@chromium.org, Jan 7

Issue description

Measure and compare syscall overhead in VM and in container.

There're several ways to do it.

1. using "lmbench". It's pre-installed on CrOS test image. The benefit of using it is that it contains other micro-benchmarks involving memory/network bandwidth and latency. However other than building it from source, the package is in Debian "non-free" component. So I'll need to modify apt sources.list to include non-free packages. Our usage didn't violet additional restrictions of lmbench though. 

2. Build open source third-party syscall benchmark from source, be it lmbench or other benchmark like unixbench. I'll need a way to pre-compile the source code and install it into the container however. Do we have a cross-compiler setup for the container? I can install gcc/clang and compile the code on-the-fly when running the benchmark, but I believe this less preferable. If we setup the toolchain, it would be useful in the future when we need to build other binary from source.

3. Write my own code snippet in other interpreter language like python or Lua. Python is pre-installed and luajit is small.  

Option 1 would be the most easy way, if adding "non-free" to container source list is not a problem.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/f2d141b65cf54a68939095b903a857f7a4a59af4

commit f2d141b65cf54a68939095b903a857f7a4a59af4
Author: Cheng-Yu Lee <cylee@chromium.org>
Date: Wed Jan 09 19:55:44 2019

lxd_test_setup:: Add non-free repository in apt sources.list for test
images.

Also install fio and lmbench for VM perf tests.

BUG= chromium:919620 
TEST=verify packages from non-free repo can be installed

Change-Id: I95937693d75baaa0bf0d2c1dd9d9bfb4847f455c
Reviewed-on: https://chromium-review.googlesource.com/1401301
Commit-Ready: Cheng-Yu Lee <cylee@chromium.org>
Tested-by: Cheng-Yu Lee <cylee@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/f2d141b65cf54a68939095b903a857f7a4a59af4/lxd/lxd_test_setup.sh

Project Member

Comment 2 by bugdroid1@chromium.org, Jan 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/7591e68dda5c29a4ca324909222fbcec248ba4da

commit 7591e68dda5c29a4ca324909222fbcec248ba4da
Author: Cheng-Yu Lee <cylee@chromium.org>
Date: Thu Jan 10 21:58:49 2019

tast-tests: Measure VM syscall latency.

BUG= chromium:919620 
TEST=tast --verbose run <DUT> vm.CrostiniCPUPerf

Change-Id: Ib47f2f6d6926e38fa26060007bae9757905bdf9b
Reviewed-on: https://chromium-review.googlesource.com/1403474
Commit-Ready: Cheng-Yu Lee <cylee@chromium.org>
Tested-by: Cheng-Yu Lee <cylee@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[add] https://crrev.com/7591e68dda5c29a4ca324909222fbcec248ba4da/src/chromiumos/tast/local/bundles/cros/vm/crostini_cpu_perf.go

Status: Fixed (was: Untriaged)
The test is running in lab and crosbolt has picked up the data.

Sign in to add a comment