{"id":1086,"date":"2011-07-27T16:02:15","date_gmt":"2011-07-27T05:02:15","guid":{"rendered":"http:\/\/blog.mozilla.org\/nnethercote\/?p=1086"},"modified":"2011-07-27T16:02:15","modified_gmt":"2011-07-27T05:02:15","slug":"memshrink-progress-week-6","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/nnethercote\/2011\/07\/27\/memshrink-progress-week-6\/","title":{"rendered":"MemShrink progress, week 6"},"content":{"rendered":"<p>Dave Hunt wrote this week about some endurance tests <a href=\"http:\/\/blargon7.com\/2011\/07\/endurance-tests-demonstrate-firefoxs-memory-usage-improvements\/\">comparing Firefox 4, 5, 6, 7, and 8<\/a>, which show how Firefox&#8217;s memory usage is improving.\u00a0 Pay most attention to the &#8216;resident&#8217; numbers for Firefox 6, 7 and 8, which indicate how much physical memory is being used.\u00a0 The &#8216;explicit&#8217; numbers show a big drop between 6 and 7, and then a rise between 7 and 8, but they are <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=673851\">suspect<\/a>, so don&#8217;t panic yet.<\/p>\n<p>about:memory improved again this week.\u00a0 I added a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=671150\">reporter for each compartment&#8217;s property table<\/a>, and two reporters <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=672694\"><code>js-compartments-system<\/code> and <code>js-compartments-user<\/code><\/a> which count how many compartments are present. These latter two will be <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=673837\">added to telemetry<\/a> soon.<\/p>\n<p>I also added a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=669611\">reporter that computes the fraction of the JS heap that is unused<\/a>, called <code>js-gc-heap-unused-fraction<\/code>.\u00a0 The results are surprising &#8212; numbers like 30% and 50% are common.\u00a0 (Some preliminary <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=670594\">JS heap visualization<\/a> helps explain why.)\u00a0 There are some suggestions for short-term improvements to mitigate this (e.g. <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=671702\">smaller GC chunks<\/a>).\u00a0 However, I suspect that to fix it properly will require a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=650161\">compacting garbage collector<\/a> &#8212; the current mark and sweep algorithm unavoidably leaves lots of holes all over the heap each time it runs.\u00a0 But I could be wrong!\u00a0 GCs have a large design space and there may be other solutions.\u00a0 A non-compacting <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=619558\">generational GC<\/a> would help in its own way too &#8212; fewer objects would reach the general heap and so each full heap collection would likely collect less garbage, and thus leave fewer holes.<\/p>\n<p>Here&#8217;s this week&#8217;s bug count:<\/p>\n<ul>\n<li>P1: 30 (+4)<\/li>\n<li>P2: 48 (-1)<\/li>\n<li>P3: 33 (+0)<\/li>\n<li>Unprioritized: 8 (+2)<\/li>\n<\/ul>\n<p>It&#8217;s nice to see the P2 count go down!\u00a0 Note that bugs remain unprioritized for two reasons.\u00a0 First, we don&#8217;t always get through all the unprioritized bugs in the MemShrink meeting.\u00a0 Second, sometimes we ask for more investigation or data before assigning a priority.<\/p>\n<p>On the topic of bugs, I closed the meta-bugs for tracking leaks against Firefox releases, and the one for tracking non-leak memory use reductions, as I <a href=\"http:\/\/blog.mozilla.org\/nnethercote\/2011\/07\/20\/memshrink-progress-week-5\/\">mooted<\/a> last week.\u00a0 I kept open the one for improving memory-related tools because multiple people though it was useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dave Hunt wrote this week about some endurance tests comparing Firefox 4, 5, 6, 7, and 8, which show how Firefox&#8217;s memory usage is improving.\u00a0 Pay most attention to the &#8216;resident&#8217; numbers for Firefox 6, 7 and 8, which indicate how much physical memory is being used.\u00a0 The &#8216;explicit&#8217; numbers show a big drop between [&hellip;]<\/p>\n","protected":false},"author":139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4550,30,4544,4546],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1086"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/users\/139"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/comments?post=1086"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/posts\/1086\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/media?parent=1086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/categories?post=1086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/nnethercote\/wp-json\/wp\/v2\/tags?post=1086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}