Closed Bug 1635642 Opened 6 years ago Closed 5 years ago

firefox is very poor at managing memory. Why would it need to use 4GB of memory with a few tabs?

Categories

(Core :: Performance: General, defect)

76 Branch
defect

Tracking

()

RESOLVED INCOMPLETE
Performance Impact medium

People

(Reporter: imkundeng, Unassigned)

Details

(Keywords: perf:resource-use)

Attachments

(1 file)

Attached file memory-report.json.gz

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

I don't know. Just browsing some websites.

Actual results:

Sometimes it uses 10GB of my memory, most of time with a few tabs open, it uses 4GB of memory. That's insane. Chrome is not much better, but at least it's slightly better.

Expected results:

Should be using less than 2GB of memory.

Could you please gather a performance profile using https://profiler.firefox.com/?

Flags: needinfo?(imkundeng)

Because this bug's Severity is normal and has not been changed, and this bug's priority is -- (none,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Tabbed Browser

Here is a website that absolutely will cause memory leak, as a developer, maybe you should try it out yourself. Do you guys not use firefox yourself???

https://www.tutorialspoint.com/mysql/index.htm

Open a few pages from this site and keep your browser open for 10 hours. You will see the result.

Flags: needinfo?(imkundeng)
Component: Tabbed Browser → Performance
Product: Firefox → Core

Thank you for bring this up - I didn't see evidence of 10GB usage in the memory report.
Can you please try another when the application is using a lot?

Andrew, do you mind checking the memory report here to see if anything abnormal?

Flags: needinfo?(continuation)
Whiteboard: [qf:p2:resource]

The main process is using about 500MB which is quite a lot. There's nothing specific that is standing out to me. It is just bits of this and that. It looks like there are a lot of browser windows open, so maybe there's overhead from that that adds up?

Other than that, nothing really stands out to me as being a singular source of high memory usage. There are a decent number of heavier pages open (60MB to 175MB). The proxmox page uses quite a bit of memory for layout, but maybe that's just because the page is so large. Maybe we could make something better there. Another process has almost 50MB of heap-overhead. Maybe it used to have more pages open.

It looks like there's on the order of a dozen tabs open, which, with the 8 content processes we have by default also means that content process overhead is maximized. I saw a number of reports like this when we bumped the number of content processes from 4 to 8. Users who open around 8 tabs get hit the hardest.

In summary, I think this is a "death by a thousand cuts" situation, which is unfortunate.

Flags: needinfo?(continuation)

This is still an issue in 2021 with the latest 64-bit browser, firefox process alone (not counting plugin-container processes) uses 2.4GB of memory and growing.

(In reply to Adam from comment #8)

This is still an issue in 2021 with the latest 64-bit browser, firefox process alone (not counting plugin-container processes) uses 2.4GB of memory and growing.

Could you please file a new bug in Core::Performance with a memory report from about:memory showing this issue? Thanks.

As for this bug, there's not really enough information to go on, so I'm going to close it as incomplete.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Performance Impact: --- → P2
Whiteboard: [qf:p2:resource]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: