Closed Bug 1457243 Opened 7 years ago Closed 7 years ago

Measure best case process memory usage on AWSY

Categories

(Testing :: AWSY, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: ajones, Assigned: erahm)

Details

Attachments

(6 files, 1 obsolete file)

The goal is to measure and graph the best case content process size. This allows us to track the memory feasibility of a large number of content processes. It should ignore shared memory components so could perhaps be measured as the difference between n and n+1 tabs of about:blank being loaded in the browser.
Just a note: this number is going to be pretty noisy. We might try something like loading 4 about:blanks, waiting 30-60s, performing a GC and then only grabbing the measurement of the 'last' about:blank process. This could just end up being the 'SY-e10s(ab)' measurement. We can probably just use the existing framework, but one thing we want to watch out for is any marionette overhead in the content process.
I have WIP cloned off the existing awsy test, I just need to clean it up and decide on how much code we can share.
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Attached patch test-sets.patch (obsolete) — Splinter Review
try this.
Attachment #8974582 - Flags: review?(bob)
This adds support for only gathering data for a given process type. It also allows you to limit the number of processes included in a measurement.
Attachment #8974583 - Flags: review?(bob)
I'm out today but I'll get to this this afternoon/evening when I get back.
Comment on attachment 8974580 [details] [diff] [review] Part 1: Support zero values for awsy params in mach_commands Review of attachment 8974580 [details] [diff] [review]: ----------------------------------------------------------------- Looks ok but if you can simplify it that would be nice. r+ ::: testing/awsy/mach_commands.py @@ +81,5 @@ > + # These args can be zero > + for arg in ('entities', 'iterations', 'perTabPause', 'settleWaitTime', 'maxTabs'): > + if arg in kwargs and kwargs[arg] is not None: > + runtime_testvars[arg] = kwargs[arg] > + Perhaps I'm missing it, but couldn't we do this for all of the args instead of having both?
Attachment #8974580 - Flags: review?(bob) → review+
Comment on attachment 8974581 [details] [diff] [review] Part 2: Allow checkpoints and perf_suites to be passed in to process_perf_data Review of attachment 8974581 [details] [diff] [review]: ----------------------------------------------------------------- r+, looks ok. ::: testing/awsy/awsy/process_perf_data.py @@ +36,3 @@ > """ > Updates CHECKPOINTS with memory report file fetched in data_path > :param checkpoint_files: list of files in data_path Document checkpoints?
Attachment #8974581 - Flags: review?(bob) → review+
Comment on attachment 8974582 [details] [diff] [review] Part 3: Split out a base awsy test case Review of attachment 8974582 [details] [diff] [review]: ----------------------------------------------------------------- r+ with fixes for the imports. ::: testing/awsy/awsy/test_memory_usage.py @@ +5,2 @@ > import os > import sys from marionette_driver.errors import JavascriptException, ScriptTimeoutException are still required in clear_preloaded_browser() @@ -26,1 @@ > from awsy import process_perf_data, webservers webservers no longer used.
Attachment #8974582 - Flags: review?(bob) → review+
Comment on attachment 8974583 [details] [diff] [review] Part 4: Support filtering on process names and limit process count Review of attachment 8974583 [details] [diff] [review]: ----------------------------------------------------------------- r+
Attachment #8974583 - Flags: review?(bob) → review+
Comment on attachment 8974584 [details] [diff] [review] Part 5: Add base case AWSY test that just measures about:blank Review of attachment 8974584 [details] [diff] [review]: ----------------------------------------------------------------- r+ with comment addressed. ::: testing/awsy/awsy/test_base_memory_usage.py @@ +42,5 @@ > + > + def perf_checkpoints(self): > + return CHECKPOINTS > + > + def iterations(self): I'm a little concerned about overriding this to return a fixed number but not also dealing with the self._iterations. Wouldn't it be better to just override self._iterations = 1 in setUp and leave this alone?
Attachment #8974584 - Flags: review?(bob) → review+
Attachment #8974585 - Flags: review?(bob) → review+
Attachment #8974488 - Attachment is obsolete: true
(In reply to Bob Clary [:bc:] from comment #15) > Comment on attachment 8974580 [details] [diff] [review] > Part 1: Support zero values for awsy params in mach_commands > > Review of attachment 8974580 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks ok but if you can simplify it that would be nice. r+ > > ::: testing/awsy/mach_commands.py > @@ +81,5 @@ > > + # These args can be zero > > + for arg in ('entities', 'iterations', 'perTabPause', 'settleWaitTime', 'maxTabs'): > > + if arg in kwargs and kwargs[arg] is not None: > > + runtime_testvars[arg] = kwargs[arg] > > + > > Perhaps I'm missing it, but couldn't we do this for all of the args instead > of having both? It's not quite the same test, like if kwargs['webroot'] were an empty string that would evaluate to False as well, but I guess that's okay. If someone specifies an empty string they probably mean it.
(In reply to Bob Clary [:bc:] from comment #16) > Comment on attachment 8974581 [details] [diff] [review] > Part 2: Allow checkpoints and perf_suites to be passed in to > process_perf_data > > Review of attachment 8974581 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+, looks ok. > > ::: testing/awsy/awsy/process_perf_data.py > @@ +36,3 @@ > > """ > > Updates CHECKPOINTS with memory report file fetched in data_path > > :param checkpoint_files: list of files in data_path > > Document checkpoints? Updated.
(In reply to Bob Clary [:bc:] from comment #17) > Comment on attachment 8974582 [details] [diff] [review] > Part 3: Split out a base awsy test case > > Review of attachment 8974582 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+ with fixes for the imports. > > ::: testing/awsy/awsy/test_memory_usage.py > @@ +5,2 @@ > > import os > > import sys > > from marionette_driver.errors import JavascriptException, > ScriptTimeoutException > > are still required in clear_preloaded_browser() Oh right, I got a bit overzealous. > @@ -26,1 @@ > > from awsy import process_perf_data, webservers > > webservers no longer used. It's still used in test_memory_usage, but I'll remove it from awsy_test_case.
(In reply to Bob Clary [:bc:] from comment #19) > Comment on attachment 8974584 [details] [diff] [review] > Part 5: Add base case AWSY test that just measures about:blank > > Review of attachment 8974584 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+ with comment addressed. > > ::: testing/awsy/awsy/test_base_memory_usage.py > @@ +42,5 @@ > > + > > + def perf_checkpoints(self): > > + return CHECKPOINTS > > + > > + def iterations(self): > > I'm a little concerned about overriding this to return a fixed number but > not also dealing with the self._iterations. > > Wouldn't it be better to just override self._iterations = 1 in setUp and > leave this alone? Sounds reasonable, I'll update.
Thanks for the reviews Bob!
https://hg.mozilla.org/integration/mozilla-inbound/rev/c216f3f88f9b4e94346db7b1a4ad9c9b300370a7 Bug 1457243 - Part 1: Support zero values for awsy params in mach_commands. r=bc https://hg.mozilla.org/integration/mozilla-inbound/rev/0629e4a05e5cf1f665957d909bcbcb0b98877d88 Bug 1457243 - Part 2: Allow checkpoints and perf_suites to be passed in to process_perf_data. r=bc https://hg.mozilla.org/integration/mozilla-inbound/rev/9091f8ac9bbd4b9d9503d57f0cd149293fd0f0c2 Bug 1457243 - Part 3: Split out a base awsy test case. r=bc https://hg.mozilla.org/integration/mozilla-inbound/rev/9b2f923280eb57dd4d6e51163b362cb7db728620 Bug 1457243 - Part 4: Support filtering on process names and limit process count. r=bc https://hg.mozilla.org/integration/mozilla-inbound/rev/cbe6ab7db4f7aa15502f37004f0f94c724d6d6fe Bug 1457243 - Part 5: Add base case AWSY test that just measures about:blank. r=bc https://hg.mozilla.org/integration/mozilla-inbound/rev/fbf88f9bacbb5568ca28d94deaa604856a2dc336 Bug 1457243 - Part 6: Hook in the about:blank awsy test to automation. r=bc
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: