Closed Bug 1530430 Opened 7 years ago Closed 7 years ago

Tabs causing a lot of memory usage

Categories

(Core :: General, defect)

65 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: Lucia, Unassigned, NeedInfo)

Details

(Whiteboard: [MemShrink])

Attachments

(5 files, 3 obsolete files)

Attached file memory-report.json.gz (obsolete) —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

For some reason if I leave my computer for a while, and come back to it later, Firefox takes up a lot of resources and makes my computer run really slow. I followed all the steps here: https://support.mozilla.org/en-US/kb/firefox-uses-too-many-cpu-resources-how-fix But I still have the same issue.

It goes away when I restart Firefox, but I was wondering if you might know a resource I could try to prevent it from slowing down.

Actual results:

On the advice of Ava Dozler, I went to About:performance and saw that there was a lot of resources being used by my mail apps.

I went to about:memory and downloaded this memory app and am preparing this bug report on her advice. Thank you for all your help!

Hi Lucia, cannot reproduce this issue, there are many factors that are involved in that high range CPU.
Can you please capture a performance profile? You can get more info on how to install and use the Cleopatra add-on (that helps you get the performance profile) by going to:
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Profiling_with_the_Built-in_Profiler
https://perf-html.io/

Liviu, who is a good person for Lucia to email the profile to?

Flags: needinfo?(liviu.seplecan)

Hi @Wayne Mery, for those info please contact @Mike Conley

Flags: needinfo?(liviu.seplecan)

What is Mike's email? How can I contact him? Thanks! -Lucia

Hi @Mike, can you help us with this issue to figure it out what might cause this high memory usage?
Thanks.

Flags: needinfo?(mconley)

I'm seeing a bit of heap unclassified in those memory reports... adding the [MemShrink] whiteboard tag so that this can be queued for our memory specialists.

In the meantime, you can send a profile to mconley at mozilla dot com. Alternatively, you could post a link to it in this bug (preferable, since that'd make it easier for more Mozilla engineering folks to look at it).

Flags: needinfo?(mconley)
Whiteboard: [MemShrink]

Thank you so so much. I'm away from my desktop right now but I will do it when I get home.

Okay I just attached it. Thanks guys.

The memory usage looks reasonable for the amount of content loaded. We did notice there's a fair amount of ad-related iframes sticking around. It might help to try out an ad-blocking extension.

Whiteboard: [MemShrink]

Based on the lack of information from the reporter this bug will have the Status: Resolved as incomplete.
If you want to add more info please fell free to reopen it. Thanks for your contribution.

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Component: Untriaged → General
Product: Firefox → Core
Resolution: --- → INCOMPLETE

Hi, This issue might have been closed by accident, We Do have the information from the Reporter, (Thanks Lucia) but we might need some help finding the correct component for this issue @Mike or @Eric.

Status: RESOLVED → UNCONFIRMED
Component: General → Untriaged
Flags: needinfo?(mconley)
Flags: needinfo?(erahm)
Product: Core → Firefox
Resolution: INCOMPLETE → ---

Thanks Rares. Yes I did submit the information. Weird, it looks like my adblocker was disabled. (I think it was giving me issues earlier?) Let met try enabling it and seeing if the same issue comes up.

Clearing needinfo until we hear back from Lucia about whether or not re-enabling the ad-blocker causes the problem to resurface.

Flags: needinfo?(mconley)
Flags: needinfo?(erahm)
Flags: needinfo?(Lucia)

Hi @Mike Conley, what should be the status of this issue ? due the fact that we get no response from the reporter. Thanks.

Flags: needinfo?(mconley)

No update from Lucia since I requested more information in comment 14. Let's close this one out as INCOMPLETE until we hear back.

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago → 7 years ago
Flags: needinfo?(mconley)
Resolution: --- → INCOMPLETE

Latest Profiler capture.

Flags: needinfo?(Lucia)

No! I'm so sorry! I did do another profile capture I just have been tardy in posting it I'm so sorry.

Yes I am having this issue again, even though I turned on the ad blocker. I just attached the latest profile capture.

I really appreciate you guys taking a look at this. Thank you so much.

Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---

Thanks for the most recent profile. I clearly see the main threads spending time GC'ing and CC'ing to try to reclaim memory. Unfortunately, it's not telling me much about what's consuming memory.

Are you still in this state? Without shutting down Firefox, can you capture another memory report from about:memory?

Flags: needinfo?(Lucia)

I had to force quit firefox because it wasn't responding and using all my memory again. I will capture another memory report right now. I'm guessing that whatever's happening is still happening it just takes a while to do so? Or I can send another one when it's at a slow down point.

Flags: needinfo?(Lucia)

I'm guessing that whatever's happening is still happening it just takes a while to do so? Or I can send another one when it's at a slow down point.

Yes - it's at the slow point where we need the memory report. Don't worry about gathering one after your most recent restart until things have started to slow down a bunch, and memory usage is high. At that point, the memory report should be more illuminating.

Setting ni? to get that report.

Flags: needinfo?(Lucia)
Flags: needinfo?(Lucia)

So I let the profiler run for a day with only one window open. (This one.) When I got back to my computer Firefox was not taking up a lot of memory. So I'm guessing it's not an issue with Firefox in general, but how one page or pages responds to firefox. Would there be a way to look in my history to see the troubled pages?

Hi @Mike Conley, due the comment 23, what should be the status of this issue? Do we need extra investigations regarding the memory usage?
Thanks.

Flags: needinfo?(mconley)

Please let me know what I can do. This is an issue that keeps coming up, like 95 % of the time, even with the ad blocker. Thanks!

I'm afraid the profiles tell me very little - what I still need is a report from about:memory, taken at the time of high memory usage.

Flags: needinfo?(mconley) → needinfo?(Lucia)
Attached file Memory report from today (obsolete) —

Okay here is the memory report from today.

Flags: needinfo?(Lucia)

Thanks, Lucia. Here's another case of large heap-unclassified allocations:

Main Process (pid 3252)
Explicit Allocations

1,578.82 MB (100.0%) -- explicit
├──1,216.56 MB (77.06%) ── heap-unclassified
├─────81.74 MB (05.18%) -- heap-overhead

I notice, Lucia, that you're still running Firefox 66. What happens if you update to the latest Firefox 67? Does the problem get any better?

Flags: needinfo?(Lucia)
Whiteboard: [MemShrink]

Oh weird. Why are so many unclassified? Is there a way to download something else to determine that? Sorry I thought I was the latest version of Firefox let me upgrade and see if this is still an issue.

Flags: needinfo?(Lucia)

Also, I tried to download a firefox extension "Simple Mass Downloader" and every time I open it, it flashes for a second then comes up blank. but I downloaded another extension to download all links and that worked. I'm wondering is this is a related Firefox memory issue?

Hi @Lucia, I guess not. I've tested again the issue with the extension from comment 30. On a specific investigation (checking on several machines: Windows, Mac OS X & Ubuntu 18.04) only on Mac OS X the extension is broken (at hover-over on extension's window, items and other functional elements will disappear).
So, did you try with the latest FF version? https://nightly.mozilla.org/ or 67 release.
Further, I will set a component on it and isn't the right one please fell free to change it.
Thanks.

Flags: needinfo?(Lucia)
Component: Untriaged → General
Product: Firefox → Core

Ah ok. Sorry about that I didn't realize Firefox nightly was the latest release. I will test that and get back to you.

Flags: needinfo?(Lucia)

(Just setting needinfo for comment 32; not meaning to increase pressure on you as your help has been great, Lucia!)

Flags: needinfo?(Lucia)
Flags: needinfo?(Lucia)

No thank YOU for all you do to make Firefox better!

The good news is that the computer seems to be handling Firefox much better. Or at least isn't freezing up.

Just to double-check though: Is it usual for FirefoxCP Webcontent to have so many running processes?

(In reply to Lucia from comment #35)

The good news is that the computer seems to be handling Firefox much better. Or at least isn't freezing up.

That's good :)

Just to double-check though: Is it usual for FirefoxCP Webcontent to have so many running processes?

Yes, we default to 8 (but they won't all exist if you have only a handful of tabs open).

When you get a chance, please attach another about:memory report from 67 so we can see if there is still lots of heap-unclassified.

Flags: needinfo?(Lucia)

I just quit firefox and reopened it, so I'm not sure if this is what you need, but here you go.

Attachment #9046403 - Attachment is obsolete: true
Attachment #9063801 - Attachment is obsolete: true
Attachment #9070393 - Attachment is obsolete: true
Flags: needinfo?(Lucia)

The priority flag is not set for this bug.
:gcp, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gpascutto)

Mike, does the new memory dump help you track this down?

Flags: needinfo?(gpascutto) → needinfo?(mconley)

(In reply to Gian-Carlo Pascutto [:gcp] from comment #39)

Mike, does the new memory dump help you track this down?

Hm, not so much I'm afraid. Comment 37 indicates that this memory report was captured immediately after browser start, and what we'd ideally get is a memory report taken at the point when Firefox is consuming too much memory.

I can see, however, that:

  1. There's 69.72MB in heap unclassified, which is a little irksome. Dark matter. :/
  2. Each content process seems to have at least 39MB of heap unclassified, which isn't great.
  3. Gmail is a large application, consuming about 161MB itself in Content Process 22952.
  4. Twitter is a large application too.
  5. The WebExtension process is quite large - I wonder if there's a WebExtension that's leaking.

Lucia, thanks so much for continuing to help us debug this. Am I correct when I say that Firefox appears to be functioning more smoothly for you now? Or is memory usage still a problem?

If memory usage is still a problem, one thing I can suggest is seeing what happens if you go to Help > Restart with Add-ons Disabled, and run for a while without any add-ons. If that lowers your memory usage, that'll help support the hypothesis that a WebExtension is causing this.

At that point, it might be worth disabling your WebExtensions one by one, surfing around a bit while measuring your memory usage, and hopefully narrowing in to see which one is the root cause, and then reporting back.

Flags: needinfo?(mconley)

The priority flag is not set for this bug.
:sphilp, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(sphilp)

It does appear to be doing a lot better with the memory in general with Nightly. I attached a new report though if you want to take a look at that. Firefox has been running for a little bit. Thanks for your help.

NI Mike so he can take a look at the reports from comment 42.

Flags: needinfo?(mconley)

(In reply to Lucia from comment #43)

It does appear to be doing a lot better with the memory in general with Nightly.

Alright, thanks Lucia. I just looked at your most recent memory report, and I agree that memory usage seems to be quite reasonable there. If the problem recurs, please feel free to re-open this bug. Thanks!

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago → 7 years ago
Flags: needinfo?(mconley)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: