Firefox OS/Performance/Automation/Memory Consumption: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
m (Lakrits moved page FirefoxOS/Performance/Automation/Memory Consumption to Firefox OS/Performance/Automation/Memory Consumption: The official spelling of "Firefox OS" leaves a space between the two parts of the name. It's easier to find a page i...)
 
(14 intermediate revisions by one other user not shown)
Line 3: Line 3:
== Summary ==
== Summary ==


Measures memory consumption of an application after [https://developer.mozilla.org/en-US/Apps/Build/Performance/Firefox_OS_app_responsiveness_guidelines startup events] in the same way it does for [https://wiki.mozilla.org/FirefoxOS/Performance/Automation/Launch_Latency launch latency].
Measures memory consumption in several test scenarios to detect abnormal memory usage patterns.


== Usage ==
* '''Lead:''' Wander Lairson Costa
 
=== Test Cases ===
 
''REMOVEME: Add names and high-level descriptions of available cases''
 
; Case 1 : Description
; Case 2 : Description
 
=== Precision ===
 
TBD
 
=== How to Run On-Demand ===
 
TBD
 
=== Published Results ===
 
TBD


==== Branch 1 ====
==== Memory usage parameters ====


{| class="wikitable"
{| border="1"
!
! Device 1
! Device 2
|-
|-
| '''Case 1''' || [http://www.example.com Datazilla] || N/A
!Parameter !! Description
|-
|-
| '''Case 2''' || [http://www.example.com Eideticker] || N/A
| VSS || Virtual set size
|-
|-
|}
| RSS || Resident set size
 
==== Branch 2 ====
 
{| class="wikitable"
!
! Device 1
! Device 2
|-
|-
| '''Case 1''' || [http://www.example.com Datazilla] || N/A
| USS || Unique set size
|-
|-
| '''Case 2''' || [http://www.example.com Eideticker] || N/A
| PSS || Proportional set size
|-
|-
|}
|}


=== References ===
== Test cases ==


* [http://www.akkadia.org/drepper/cpumemory.pdf What every programmer should know about memory]
=== Startup Memory Consumption ===
* [http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ Why mobile web apps are slow]
* [https://developer.mozilla.org/en-US/Apps/Build/Performance/Firefox_OS_app_responsiveness_guidelines Firefox OS App Responsiveness Guidelines]


== Development ==
* '''Tracking Bug:''' [http://bugzilla.mozilla.org/show_bug.cgi?id=1044297 1044297]


=== Design ===
Measures memory consumption of the application and b2g process after [https://developer.mozilla.org/en-US/Apps/Build/Performance/Firefox_OS_app_responsiveness_guidelines moz-app-loaded event].


''REMOVEME: This section is documentation of the steps a case goes through, at enough detail to review or duplicate them. Delete any unneeded setup/teardown sections. These can also be links into [https://moztrap.mozilla.org/results/runs/ MozTrap], if the tests are documented there.
Launch each of the following apps:


==== Common Setup ====
* Browser
# Step 1
* Calendar
# Step 2
* Camera
* Clock
* Contacts
* Dialer
* Email
* FM Radio
* Gallery
* Marketplace
* Music
* Settings
* SMS
* Template
* Usage
* Video


==== Case 1 ====
For each app, report the the memory usage after the moz-app-loaded event, for both the app and b2g process. Below you can see a flowchart of the test case:
* Setup
*# Step 1
*# Step 2


* Test
[[File:Moz-app-load-mem-test.jpg|600x600px|framed|center|Flowchart of the startup memory test]]
*# Step 1
*# Step 2


* Teardown
==== Common Setup ====
*# Step 1
*# Step 2


==== Case 2 ====
# Set up workload
* Setup
# Restart B2G process
*# Step 1
# Invoke launch programmatically
*# Step 2
# Inject the Performance Helper
# App instrumentation throws timeline events at appropriate times
# Performance helper observes events
# After moz-app-loaded event grab memory usage parameters for the app and b2g process


* Test
==== Results ====
*# Step 1
* Result is the memory usage summary for app and b2g process.
*# Step 2


* Teardown
=== Homescreen memory performance ===
*# Step 1
*# Step 2


=== Results ===
* '''Tracking Bug:''' [https://bugzilla.mozilla.org/show_bug.cgi?id=1048443 1048443]


* Repetition, results, etc.
TBD


==== Common Teardown ====
=== Identify apps memory leaks ===
# Step 1
# Step 2


=== Project Roadmap ===
* '''Tracking Bug:''' [https://bugzilla.mozilla.org/show_bug.cgi?id=1041668 1041668]


* '''Lead:''' Wander Lairson Costa
TBD
* '''Tracking Bug:''' TBD


''REMOVEME: This indexes bugs and progress for each step of the test case creation from design to publication. Modify the tables to factor out common designs, remove the instrumentation columns, or whatever is appropriate. The "Availability" column should either be "ETA <release>", "release" for delivered items, or "TBD"''
== References ==


{| class="wikitable"
* [http://www.akkadia.org/drepper/cpumemory.pdf What every programmer should know about memory]
! width="120px" |
* [http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ Why mobile web apps are slow]
!
* [https://developer.mozilla.org/en-US/Apps/Build/Performance/Firefox_OS_app_responsiveness_guidelines Firefox OS App Responsiveness Guidelines]
! colspan="2" | Milestone 1: Design
! colspan="4" | Milestone 2: Test
! colspan="2" | Milestone 3: Publication
|-
!
! Availability
! Test Design
! Validity Review
! Instrumentation
! Workload
! On-Demand Test
! Results Review
! Published Results
! Documentation
|-
| '''Case 1''' || TBD || Bug || Bug || Bug || Bug || Bug || Bug || Bug || Bug
|-
| '''Case 2''' || TBD || Bug || Bug || Bug || Bug || Bug || Bug || Bug || Bug
|-
|}


<small>[http://wiki.mozilla.org/FirefoxOS/Performance/Automation/Test_Template template]</small>
<small>[http://wiki.mozilla.org/FirefoxOS/Performance/Automation/Memory_Consumption]</small>

Latest revision as of 13:59, 1 February 2015

Memory Consumption

Summary

Measures memory consumption in several test scenarios to detect abnormal memory usage patterns.

  • Lead: Wander Lairson Costa

Memory usage parameters

Parameter Description
VSS Virtual set size
RSS Resident set size
USS Unique set size
PSS Proportional set size

Test cases

Startup Memory Consumption

Measures memory consumption of the application and b2g process after moz-app-loaded event.

Launch each of the following apps:

  • Browser
  • Calendar
  • Camera
  • Clock
  • Contacts
  • Dialer
  • Email
  • FM Radio
  • Gallery
  • Marketplace
  • Music
  • Settings
  • SMS
  • Template
  • Usage
  • Video

For each app, report the the memory usage after the moz-app-loaded event, for both the app and b2g process. Below you can see a flowchart of the test case:

Flowchart of the startup memory test

Common Setup

  1. Set up workload
  2. Restart B2G process
  3. Invoke launch programmatically
  4. Inject the Performance Helper
  5. App instrumentation throws timeline events at appropriate times
  6. Performance helper observes events
  7. After moz-app-loaded event grab memory usage parameters for the app and b2g process

Results

  • Result is the memory usage summary for app and b2g process.

Homescreen memory performance

TBD

Identify apps memory leaks

TBD

References

[1]