Performance/MemShrink

From MozillaWiki
Jump to navigation Jump to search

MemShrink is a project that aims to reduce Firefox's memory consumption. There are three potential benefits.

  1. Speed. Firefox will be faster due to less cache pressure, less paging, and fewer/smaller GC and CC pauses. Changes that reduce memory consumption but make Firefox slower are not desirable.
  2. Stability. Firefox will suffer fewer aborts/crashes due to virtual or physical memory exhaustion. The former is mostly a problem on 32-bit Windows builds with a 2GB or 4GB virtual memory limit, the latter is mostly a problem on mobile devices that lack swap space.
  3. Reputation. Fewer people will complain that Firefox is a memory hog and that Mozilla ignores memory usage.

This blog post describes these benefits in more detail.

There are two main ways to reduce memory consumption.

  1. "Slim down" memory usage, e.g. make data structures more space-efficient.
  2. Avoid "leaks". This loose use of the term (which is used throughout this document) includes:
    • True leaks, where memory is lost forever.
    • Lifetime issues, where memory is not reclaimed until you close the page/tab/window/process.
    • Collection heuristic issues (e.g. GC is too infrequent).
    • Bad cache algorithms and poorly tuned caches.
    • Fragmentation.

Leaks are generally more important, because they are more likely to lead to horrible performance.

Meetings

Meetings happen every second Tuesday at 2pm Pacific time.


  • Dial-in: Audio-only conference# 95346
    • People with Mozilla phones or softphones please dial x4000 Conf# 95346
    • US/Toll-free: +1 800 707 2533, (pin 4000) Conf# 95346
    • US/California/Mountain View: +1 650 903 0800, x4000 Conf# 95346
    • US/California/San Francisco: +1 415 762 5700, x4000 Conf# 95346
    • US/Oregon/Portland: +1 971 544 8000, x4000 Conf# 95346
    • CA/British Columbia/Vancouver: +1 778 785 1540, x4000 Conf# 95346
    • CA/Ontario/Toronto: +1 416 848 3114, x4000 Conf# 95346
    • UK/London: +44 (0)207 855 3000, x4000 Conf# 95346
    • FR/Paris: +33 1 84 88 37 37, x4000 Conf# 95346
    • Gmail Chat (requires Flash and the Google Talk plugin): paste +1 650 903 0800 into the Gmail Chat box that doesn't look like it accepts phone numbers
    • SkypeOut is free if you use the 800 number
  • Vidyo: PB&J
  • IRC: #memshrink
  • Etherpad: memshrink (copied to wiki after the meeting)

Meeting Minutes, Progress Reports and Presentations

Meeting dates, meeting minutes, and progress reports.

Date Minutes Progress report
2013-02-05 - Week 85--86
2013-01-22 - Week 83--84
2013-01-08 - Week 79--82
2012-12-11 - Week 77--78
2012-11-27 - Week 75--76
2012-11-13 - Week 73--74
2012-10-30 - Week 71--72
2012-10-16 - Week 69--70
2012-10-02 - Week 67--68
2012-09-18 - Week 65--66
2012-09-04 - Week 63--64
2012-08-21 - Week 61--62
2012-08-07 - Week 57--60
2012-07-24 - -
2012-07-10 - Week 55--56 (includes the second "Big Ticket Items" list)
2012-06-26 - Week 53--54
2012-06-14 - MemShrink's 1st Birthday
2012-06-12 - Week 51--52
2012-05-29 - Week 49--50
2012-05-15 - Week 47--48
2012-05-01 - Week 45--46
2012-04-17 - Week 43--44
2012-04-03 - Week 42
2012-03-27 - Week 41
2012-03-20 - Week 40
2012-03-13 - Week 39
2012-03-06 - Week 38
2012-02-28 - Week 37
2012-02-21 - Week 36
2012-02-14 - Week 35
2012-02-07 - Week 34
2012-01-31 - Week 33
2012-01-24 - Week 32 (includes the first "Big Ticket Items" list)
2012-01-17 - Week 31
2012-01-10 - Week 30
2012-01-03 - Weeks 28--29
2011-12-20 - Week 27
2011-12-13 minutes Week 26
2011-12-06 minutes Week 25
2011-11-29 minutes Week 24
2011-11-22 - Week 23
2011-11-15 - Week 22
2011-11-08 minutes Week 21
2011-11-01 minutes Week 20
2011-10-25 minutes Week 19
2011-10-18 minutes Weeks 13--18
2011-10-11 minutes -
2011-10-04 minutes -
2011-09-27 - -
2011-09-20 minutes -
2011-09-13 - -
2011-09-06 minutes Week 12
2011-08-30 minutes Week 11
2011-08-23 minutes Week 10
2011-08-16 minutes Week 9
2011-08-09 minutes Week 8
2011-08-02 - Week 7
2011-07-26 minutes Week 6
2011-07-19 minutes Week 5
2011-07-12 minutes Week 4
2011-07-05 minutes Week 3
2011-06-28 - Week 2
2011-06-21 - Week 1
2011-06-14 - -


Presentations.

Bug Tracking

Bugs tracked by the MemShrink project are prioritized by adding one of "MemShrink:P1", "MemShrink:P2" or "MemShrink:P3" to the whiteboard.

Some other interesting bug lists that overlap with the ones above.

areweslimyet.com

http://arewefastyet.com is a very successful site used to track the performance of Firefox's JavaScript engine. Why was arewefastyet.com so successful? Some key characteristics.

  • The benchmarks were easy to choose: everybody already used SS and V8, and then Mozilla released Kraken. They run quickly, too, which is nice for devs, and allows expensive tools (like Cachegrind) to be used.
  • The metrics were easy to choose. SS time, V8 time, Kraken time. They can be measured easily, precisely, and fairly repeatably. You can break the total time down into per-benchmark times, which really helps with understanding improvements and regressions. They're easy for devs to run on their own machine.
  • There was a well-defined goal: match or beat the other browsers.

In comparison, for memory consumption there is no good and/or standard benchmark suite; metrics are less clear and harder to measure (especially across different browsers); and most importantly, there's no well-defined goal w.r.t. any benchmarks.

Nonetheless, we've created a memory benchmark and are tracking Firefox's performance on it over time, to provide a sense of MemShrink progress and detect regressions. It is available at http://areweslimyet.com/.