New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 913027 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Add helper script to create a fake $HOME for running tests in

Project Member Reported by dcheng@chromium.org, Dec 7

Issue description

Running content_browsertests on gLinux is *extremely* slow. I have 20 physical cores... and nearly 100% of the CPU time is taken by credkit-service! Individual test cases take ~12 seconds to complete each. This seems ridiculously high, even given how heavy a browser test is.

It looks like there's a corp bug for this (https://b.corp.google.com/issues/28279097), but it's basically won't fix. It looks like we've worked around this for run-webkit-tests by creating a fake $HOME; if this helped run-webkit-tests, we should see if we can pull this out as a separate helper script.
 
Owner: dcheng@chromium.org
Status: Started (was: Unconfirmed)
(For reference, the bug to fix this in run-webkit-tests is https://bugs.chromium.org/p/chromium/issues/detail?id=612730)
OK, I got some preliminary results back.

$ time testing/xvfb.py out/release/content_browsertests --test-launcher-bot-mode

real    35m2.658s
user    64m33.190s
sys     11m59.052s

$ time ./fastify.py testing/xvfb.py out/release/content_browsertests --test-launcher-bot-mode

real    6m55.711s
user    57m0.951s
sys     10m37.073s
Cc: jdeblasio@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b2c7055c1f452e460004d30c87a6a987a456b1a

commit 1b2c7055c1f452e460004d30c87a6a987a456b1a
Author: Daniel Cheng <dcheng@chromium.org>
Date: Mon Dec 10 23:59:11 2018

Add run_with_dummy_home.py to speed up browser tests by 5x on gLinux.

This is useful for isolating tests from the insanity that might reside
in $HOME. For example, certain NSS configurations can cause process
startup to be extremely slow. Preliminary numbers indicate a 5.4x
speedup when running all content_browsertests with 20 parallel jobs on
gLinux.

Bug:  913027 
Change-Id: I87097223aca2e121b557c2a982ec0cbc9cd2321c
Reviewed-on: https://chromium-review.googlesource.com/c/1368589
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615334}
[add] https://crrev.com/1b2c7055c1f452e460004d30c87a6a987a456b1a/testing/run_with_dummy_home.py

Status: Fixed (was: Started)
We'll probably want to figure out how to consolidate things a bit, now that we have xvfb.py, test_env.py, now run_with_dummy_home.py, but there's a bandaid checked in for now, at least.

Sign in to add a comment