Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Issue 606683005: Telemetry: featurize tab_switching test for compressed swap performance (Closed)

Created:
6 years, 2 months ago by Luigi Semenzato
Modified:
5 years, 5 months ago
CC:
chromium-reviews, telemetry+watch_chromium.org, slavamn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Telemetry: featurize tab_switching test for compressed swap performance This adds features to the tab switching test for measuring various aspects of compression in the memory manager (zram, zswap, or other techniques). Three new command-line options control aspects of the test that are needed when stressing the memory system (i.e. paging a lot). --cycle-count Swapping increases both time and variance of tab switching. With this option we instruct the test to cycle through the entire set of tabs multiple times to reduce the variance. --pageset-replicate This is a simple way of adjusting the number of tabs so that the total memory needed is larger than RAM. --pageset-truncate Finer adjustment. The truncation (max number of pages) is applied after the replication. --poll-interval The WaitFor function, which is used to detect completion of a tab switch by polling the state of a histogram, employs a variable polling frequency which decreases as time passes. This flag forces the use of a fixed frequency as specified. BUG=417886 TEST=manual

Patch Set 1 #

Patch Set 2 : change x = x * y to x *= y #

Patch Set 3 : fix .json file which I didn't mean to change #

Patch Set 4 : remove another unintentional change #

Patch Set 5 : added --pageset-truncate #

Patch Set 6 : fix "wait for histogram change" condition #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -14 lines) Patch
M tools/perf/measurements/tab_switching.py View 1 2 3 4 5 3 chunks +37 lines, -11 lines 2 comments Download
M tools/telemetry/telemetry/core/util.py View 2 chunks +5 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/page/page_runner.py View 1 2 3 4 2 chunks +13 lines, -0 lines 3 comments Download

Messages

Total messages: 18 (5 generated)
Luigi Semenzato
Some changes to the test for use in memory compression benchmarks. I am not sure ...
6 years, 2 months ago (2014-09-25 22:57:55 UTC) #2
Luigi Semenzato
I added a --pageset-truncate option, which turned out to be important to fine-tune the amount ...
6 years, 2 months ago (2014-09-26 20:55:11 UTC) #3
Luigi Semenzato
I think I found the problem with the excessively fast tab switches---please hold your review ...
6 years, 2 months ago (2014-09-26 21:04:23 UTC) #4
Luigi Semenzato
There was a problem with detection of histogram changes. However I don't see much difference ...
6 years, 2 months ago (2014-09-26 23:34:10 UTC) #5
tonyg
The way tab switching is implemented prior to this patch isn't ideal. This patch adds ...
6 years, 2 months ago (2014-09-29 16:54:09 UTC) #7
Luigi Semenzato
On 2014/09/29 16:54:09, tonyg wrote: > The way tab switching is implemented prior to this ...
6 years, 2 months ago (2014-09-29 17:19:48 UTC) #8
aiolos (Not reviewing)
This approach is not lgtm. The reason is that this CL relies heavily on adding ...
5 years, 8 months ago (2015-04-03 18:16:39 UTC) #12
aiolos (Not reviewing)
On 2014/09/29 17:19:48, Luigi Semenzato wrote: > On 2014/09/29 16:54:09, tonyg wrote: > > The ...
5 years, 8 months ago (2015-04-03 18:23:36 UTC) #13
nednguyen
page_runner.py file no longer exists. You may want rethink of how this feature can be ...
5 years, 8 months ago (2015-04-03 18:26:44 UTC) #14
Luigi Semenzato
On 2015/04/03 18:16:39, aiolos wrote: > This approach is not lgtm. > > The reason ...
5 years, 8 months ago (2015-04-03 19:47:05 UTC) #15
Luigi Semenzato
On 2015/04/03 18:23:36, aiolos wrote: > On 2014/09/29 17:19:48, Luigi Semenzato wrote: > > On ...
5 years, 8 months ago (2015-04-03 19:50:37 UTC) #16
Luigi Semenzato
On 2015/04/03 18:26:44, nednguyen wrote: > page_runner.py file no longer exists. You may want rethink ...
5 years, 8 months ago (2015-04-03 19:51:16 UTC) #17
nednguyen
5 years, 8 months ago (2015-04-03 19:54:40 UTC) #18
On 2015/04/03 19:47:05, Luigi Semenzato wrote:
> On 2015/04/03 18:16:39, aiolos wrote:
> > This approach is not lgtm.
> > 
> > The reason is that this CL relies heavily on adding more commandline
options.
> We
> > are in the process of reducing them and have a very high bar for accepting
new
> > ones. The reason for this is that benchmarks should be consistent across
runs.
> > Allowing something as drastic of a change as this to be specified at runtime
> > reduces the usability of the information we would get out of the benchmark.
> 
> We want to run these benchmarks on systems with different memory sizes, so,
> since we want to stress swap, the load is going to have to be different on
each
> platform.  There are other factors too, for instance whether GPU buffers are
> swappable or not (x86 vs. ARM).  We're not going to compare platforms with
each
> other.
> 
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/perf/measurements...
> > File tools/perf/measurements/tab_switching.py (right):
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/perf/measurements...
> > tools/perf/measurements/tab_switching.py:13: import optparse
> > argparse should be used instead of optparse.
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/perf/measurements...
> > tools/perf/measurements/tab_switching.py:35: def AddCommandLineArgs(cls,
> > parser):
> > This shouldn't be specified via commandline arg.
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/telemetry/telemet...
> > File tools/telemetry/telemetry/page/page_runner.py (right):
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/telemetry/telemet...
> > tools/telemetry/telemetry/page/page_runner.py:211:
> > group.add_option('--pageset-replicate', default=1, type='int',
> > On 2014/09/29 16:54:09, tonyg wrote:
> > > It's not clear from this description why this is different from
> > > --pageset-repeat. Perhaps we should just change the behavior of the tab
> > > switching measurement given a pageset repeat? Or perhaps we should just
make
> a
> > > new page set for the case you have in mind?
> > 
> > It's also unclear to me why this is different.
> 
> --pageset-repeat specifies how many times a pageset is loaded sequentially
> during page cycling.  --pageset-replicate transforms a page set into a large
one
> by replicating its 
> 
> Yes, I can change the behavior of --pageset-repeat so that it produces the
> desired behavior in the tab_switching test.  It may be messy because right now
> it controls an outer loop which runs the rest of the experiment.  But in our
> case the outer loop should always be 1 because the iterations we're interested
> in are the tab switching iterations, not the loading + switching.
> 
> Maybe it's a side effect from trying to reuse too much code.
> 
> > 
> >
>
https://codereview.chromium.org/606683005/diff/100001/tools/telemetry/telemet...
> > tools/telemetry/telemetry/page/page_runner.py:214:
> > group.add_option('--pageset-truncate', default=sys.maxint, type='int',
> > This logic shouldn't be here if it's needed and I'm not convinced it's
needed.
> > Why can't you just create the page_set of the size you need?
> 
> As I mentioned, it's not practical to create different page sets for all
> combinations of memory sizes and architectures, not to mention other factors.

PageSet are also python, so I don't see how it's impractical to create a page
set will duplicate pages. If there are some pattern of creating page sets that
fit your testing needs, you can create s.t like a PageSetFactory to make it
convenient to create them.

The factory logic for creating page set shouldn't be a part of telemetry/....
but just live in perf/page_sets/...

Powered by Google App Engine
This is Rietveld 408576698