Closed Bug 1759200 Opened 3 years ago Closed 3 years ago

Why does Firefox swap so much?

Categories

(Core :: Performance: General, defect)

Firefox 98
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: oluoluolu+ffbugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0

Steps to reproduce:

Usually I have a lot of tabs open (let's say at least 100).
I have "learned" and installed Auto Tab Discard (I don't know how it actually works though).
Most of my tabs wind up discarded.

Like yesterday I had between 100 and 200 tabs open, but I started FF in offline mode, and it started swapping for about a half hour.

Actual results:

Excessive swapping on a regular basis and excessive memory use sometimes (like all system memory (recently it has been using all my swap space too, so I'm guessing a leak somewhere).

Expected results:

I would just like it to stop swapping so much.

I would also appreciate some pointers on how to investigate why it is swapping.

I know this not n excellent bug report - feel free to follow up.

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

This is a usability/user experience issue, not a tabbed browser issue (I don't know how to change it.)

This has been happening in some form since Firefox 70's (the swapping - though that system had VERY little working memory).

I'm actually going to buy a new system very soon, but still, I believe some mitigation needs to take place to relieve this.

For example, on mobile/Fenix (or Fennec?), tabs are completely unloaded after a certain amount of time. Personally, I think some sort of serialization to disk of old tabs would be ok, though I don't ever expect to see this feature, honestly.

Component: Tabbed Browser → Performance
Flags: needinfo?(dao+bmo)
Product: Firefox → Core

I haven't synced my profile yet, so I don't know if everything is going to work.

But in the forums a commenter said that there are memory fragmentation issues in Firefox.
Personally, I think it's runaway Javascript, but I have no evidence.
I would like to know if there's any way to check something like this.

But, for some reason, Firefox swapped for like 18 hours on my old system last night. Strange.

--safe-mode loads quickly, but I need Tab Stash to save my tabs, and the temporary install of an extension option did not work for me.

What to do?

FWIW I have no problem building from source.

I think we would need to get a profile with the issue happening to get a better idea. You can follow the instructions here: https://firefox-source-docs.mozilla.org/performance/reporting_a_performance_problem.html and gather a profile with the issue. You can upload the profile with the "upload profile" button on the top right corner.
Thanks!

Flags: needinfo?(oluoluolu+ffbugzilla)

Thank you responding and sorry that I am just getting back.

Unfortunately that system has been "decommissioned" -- it has been backed up, but I don't know if I will be revisiting that anytime soon.

I will keep your advice in mind, and will be reviewing the linked documentation after I post this.

Flags: needinfo?(oluoluolu+ffbugzilla)

Please re-open if appropriate.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.