Closed Bug 1563723 Opened 5 years ago Closed 4 years ago

Excess memory usage after restoring multi-tab session

Categories

(Firefox :: Session Restore, defect)

67 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jbstrater, Unassigned)

Details

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

Steps to reproduce:

This is not a simple issue to reproduce, but I wanted to create the bug.
Every day I power on my computer (Windows 10), open Firefox, and restore my previous session. In that session I might have a youtube tab with a video I'm in the middle of watching, maybe another video in another tab, and news and technical docs articles in the rest of the tabs. 8-10 tabs open in the window.

At some point in the past couple of weeks, I started noticing my system slowing down. It kept getting worse. I saw that my memory usage had gone over 90%, and that lack of RAM was causing the problem. But I didn't want to go buy more RAM right away.

Yesterday, something happened accidentally that caused me to lose my "previous session" in Firefox, and I had to start with a fresh Firefox session, 1 tab only. Suddenly my memory usage was less than 70% and all my performance problems went away. It was clearly an issue with Firefox. Opening the same tabs again does not reproduce the issue. It seems to take time to build up the excess memory usage. I have 8GB of RAM, so each 10% is 800MB.

Actual results:

Excess memory usage by Firefox, but the memory doesn't show as belonging to Firefox in the Task Manager's Processes tab. Firefox never appears to use more than 1.5GB of memory, and generally less than 800MB. The excess memory usage appears to belong to another process or other processes. I cannot determine the specific processes using this excess memory.

Expected results:

I will be monitoring this going forward, as I like restoring my previous session.

Component: Untriaged → Session Restore

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(mdeboer)

I have just experienced this a second time. I cannot provide reproduction steps yet. The only suspicion I have is that it is related to video streaming, and I only stream on 3 or 4 sites. My main suspect is dailymotion.com, because I recently streamed from them and this recently arose again.

Happened again this morning with fewer tabs open. Maybe it's the msnbc.com video player (it's kinda lousy in many ways).
Yesterday and today when it happened I had Task Manager open when I closed Firefox. After I close Firefox, while it is closing, at least 6 other Firefox processes appear in Task Manager. I am sorting processes by memory usage the whole time. These additional instances appear high on the list, and out of nowhere. They were not on the list prior to closing Firefox.
I was at 93% memory usage (out of 8GB), and Firefox was using close to 2GB or 25%. After closing Firefox I was at 37% memory usage. That's a change of 56%. The numbers don't add up. Firefox was actually using >4GB.

Just happened again:
Task Manager says 93% memory usage, Firefox is using just under 2GB out of 8GB.
I close Firefox and see 8 Firefox processes running. On my i5 desktop it took >60 seconds from when the browser window closed for Firefox to disappear from Task Manager's list of open applications. Even after the 2GB process closed it took a while for the other Firefox processes to close.
Once Firefox was closed, Task Manager memory usage is at 35%, almost a 60% change. 60% = 4.8GB.

This time I only had 4 tabs open, but 3 of those had had videos playing in them. 3 sites: dailymotion.com, youtube.com, msnbc.com.

Hi! Apology for the late reply.

So it's pretty clear that the excess memory usage is due to the pages you have open, especially playing videos seem to be asking a lot of your system sometimes. But Session Restore is not responsible for managing the memory of pages loading individually. The sites you mention are known to be on the heavy-weight side, also when you start with a fresh session (no tabs restored) and load the sites individually.

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