Last Comment Bug 849743 - Huge memory usage during long running Firefox, with 24 extensions enabled
: Huge memory usage during long running Firefox, with 24 extensions enabled
Status: RESOLVED WONTFIX
[MemShrink:P3]
:
Product: Core
Classification: Components
Component: General (show other bugs)
: 23 Branch
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 848560
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-11 00:46 PDT by Kami
Modified: 2014-11-24 07:23 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Long runinng session and restarted Firefox /all tab was reloaded, separeted by "--- Firefox restart ---" (2.80 MB, text/plain)
2013-03-11 00:46 PDT, Kami
no flags Details
Attached about:support textfile (15.66 KB, application/octet-stream)
2013-03-20 02:24 PDT, Kami
no flags Details
Before (262.57 KB, application/x-gzip)
2013-05-02 01:38 PDT, Kami
no flags Details
After (285.82 KB, application/x-gzip)
2013-05-02 01:38 PDT, Kami
no flags Details

Description Kami 2013-03-11 00:46:46 PDT
Created attachment 723361 [details]
Long runinng session and restarted Firefox /all tab was reloaded, separeted by "--- Firefox restart ---"

I am using Nightly, with a few of my favorite extension. I am lazy when I am browsing, and I close already read tabs later. Time by time it happens my Nightly eats 3 Gig of ram that sounds crazy. I am enclosing two about:memory verbose dump

1) Unnecessary tabs are closed (initally I had 80 tabs opened then down to 30)
2) Nightly restarted and all on demands tab are selected (to reload its contents)

Is it possible to track more precisly what casuses about 1 GB difference between 1 and 2. Generally my Nightly is memory hungry, it uses near 1GB memory with 10 pinned tabs. When I reset profil I have much better experience, but when I reenable sync all thing go to the wrong direction. How can I figure out what's wrong my synced profile?
Comment 1 Nicholas Nethercote [:njn] 2013-03-19 17:02:44 PDT
This is an interesting report, but there's not quite enough useful to make any kind of useful progress.

First, which add-ons do you have enabled?

Also, in the first about:memory you have 400 MiB in the people.mozilla.org/~wmccloskey/incremental-blog/example-pause.htm page, but only 7 MiB in the second page.

In terms of getting accurate diffs between measurements, we have a script for diffing JSON memory report dumps, but we need to expose that to users (bug 848560).
Comment 2 Kami 2013-03-20 02:22:51 PDT
I can retest it during the weekend. I will start it on Friday, and report it to you on Monday. During this period I will not use the machine, just leave the tabs open. Unfortunately I got an another bug that causes segmentation fault. I try to update when it is get fixed: 851806

I have separated bug for people.mozilla.org/~wmccloskey/incremental-blog/example-pause.htm page under 838087

I will provide JSON about:memory.
Comment 3 Kami 2013-03-20 02:24:37 PDT
Created attachment 727104 [details]
Attached about:support textfile
Comment 4 Nicholas Nethercote [:njn] 2013-03-20 16:44:27 PDT
> I will provide JSON about:memory.

Unfortunately there's no easy way to trigger the JSON dump.  That's why this depends on bug 848560.
Comment 5 Kami 2013-03-22 04:52:55 PDT
Then I will wait it :o) Thanks!
Comment 6 Kami 2013-03-25 00:51:45 PDT
Is memchaser logfile is useful for you? I logged it during the weekend while memory usage went from 1,4 GiB to 2,5 GiB. Of course I haven't used the box.
Comment 7 Kami 2013-04-02 00:15:32 PDT
After 3 day long weekend:
u     21233 82.9 80.7 7547736 4938100 ?     Dl   Mar29 4526:59 /usr/lib/firefox-trunk/firefox-trunk
u     21318 11.3  1.2 1092812 79364 ?       Sl   Mar29 621:04 /usr/lib/firefox-trunk/plugin-container /usr/lib/adobe-flashplugin/libflashplayer.so -greomni /usr/lib/firefox-trunk/omni.ja -appomni /usr/lib/firefox-trunk/browser/omni.ja -appdir /usr/lib/firefox-trunk/browser 21233 plugin
u     21358  0.0  0.0 279804   232 ?        Sl   Mar29   4:20 /usr/lib/firefox-trunk/plugin-container /opt/google/talkplugin/libnpgoogletalk.so -greomni /usr/lib/firefox-trunk/omni.ja -appomni /usr/lib/firefox-trunk/browser/omni.ja -appdir /usr/lib/firefox-trunk/browser 21233 plugin
Comment 8 Nicholas Nethercote [:njn] 2013-04-02 16:12:47 PDT
MemShrink:P3 until we get more data via bug 848560.
Comment 9 Nicholas Nethercote [:njn] 2013-04-09 18:55:19 PDT
Bug 848560 has landed.  Thanks for waiting.

Can you update to the latest Nightly and use the "Write reports to a file" button at the bottom of about:memory to take measurements before and after?  Thanks!

And I see you have 24 extensions enabled.  It's extremely likely one of them is the problem.  MemChaser (ironically enough) has been seen to cause increases in memory consumption in the past.  I'd suggest you disable it before doing measurements.
Comment 10 Kami 2013-04-10 02:48:58 PDT
I can't see the feature on the current Nightly PPA (Ubuntu). I will try tomorrow.
Comment 11 Kami 2013-04-17 23:18:41 PDT
Can I send the reports privately? I was not able to reproduce the problem during the weekend, but today I got 2,8 GB memory usage of Firefox. Restarting FF, and waiting all tab to load takes aroun 1,8 GB.
Comment 12 Nicholas Nethercote [:njn] 2013-04-18 17:27:14 PDT
> Can I send the reports privately?

Sure, send them to my email address (hover over my user name above to see it).  Is it ok if I post interesting snippets of the data?  I'll make sure I scrub any URLs.
Comment 13 Kami 2013-04-19 05:13:10 PDT
Sent. You can do it as you wrote.
Comment 14 Nicholas Nethercote [:njn] 2013-04-21 23:32:49 PDT
Kami sent me two memory report dumps, one after browsing for a while, and one after restarting and reloading the open tabs.

On restart, enough tabs were open and extensions in use that "explicit" was 1,756.  In the "high usage" dump, "explicit" had climbed to 2,737 MiB.  There was a Facebook tab that grew a bit and multiple (I think) gmail tabs that also grew, plus some other stuff.  And 160 MiB of orphan nodes spread across various tabs.  I didn't see anything suspicious relating to extensions.

So I think overall it's mostly a combination of fragmentation and sites just holding onto more data as they're used for long periods.  Generational GC (bug 619558) will help but I don't see anything else to chase here.
Comment 15 Kami 2013-05-02 01:38:07 PDT
Created attachment 744519 [details]
Before
Comment 16 Kami 2013-05-02 01:38:34 PDT
Created attachment 744520 [details]
After
Comment 17 Kami 2013-05-02 01:40:48 PDT
Hi Nicholas,
I attach an another case, on same machine. Can you check it? The difference is ~ 400 MB. How can I easily compare the memory reports?
Comment 18 Andrew McCreight [:mccr8] 2013-05-02 07:55:07 PDT
Recent versions of Nightly have a way to save memory reports to a compressed format, and also diff them.  It is in about:memory.
Comment 19 Kami 2014-11-24 07:23:29 PST
Old version. I will open a new one if required.

Note You need to log in before you can comment on or make changes to this bug.