Closed Bug 1820789 Opened 3 years ago Closed 2 years ago

High memory usage of gpu-committed and gpu-shared with YouTube

Categories

(Core :: Graphics, defect)

Firefox 111
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dienand, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(6 files)

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

Steps to reproduce:

I noticed that when I was viewing a couple of videos throughout the day on YouTube with Firefox Developer Edition 111.0b8 (64-bit) it would start using insane amounts of GPU memory. Sometimes ridiculous amounts like 6gb, 8gb, 18gb etc would be consumed and never be released even if I closed the YouTube tabs that were running. I tracked this by going to about:processes to see the GPU memory usage.

I also tested with a clean install of Firefox 110.0.1 (64-bit) and got a similar result (see attached screenshot.) The screenshot was taken after I opened a couple of videos in a clean Firefox install with no extensions and then played a couple of seconds of video each video and closing those youtube tabs again. 2GB of memory is consumed and it will never be released unless you restart Firefox.

Actual results:

Watching videos on YouTube will cause Firefox to allocate GPU memory that is never released even if the tabs are closed. Use about:processes to check this! You can also track the process with something like Process Explorer from Sysinternals.

Expected results:

Firefox should release the GPU memory used by a tab when it is closed!

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

Component: Untriaged → Graphics
Product: Firefox → Core

One thing I should probably mention is that this seems to happen for me with integrated graphics (eg. Intel built in gpu) and not on systems that have a discrete GPU

Sotaro, are you able to reproduce this? What information would we need from the reporter to determine which codec / compositing / rendering gfx path they're using to observe this?

ferdinand.vktr, could you paste the output of your about:support here?

Severity: -- → S3
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(ferdinand.vktr)
Hi there, thanks for getting back to me. Since I've been testing on 2 versions of Firefox, here is the information from the developer edition:
And here is the attachment from the clean install of Firefox that I tested on later

I'll be able to try and reproduce the issue on my end and send you memory reports from about:memory if you'll need that, but since it's pretty late on my end right now I'll only send that to you tomorrow.

Flags: needinfo?(ferdinand.vktr)
See Also: → 1828587

If you are still experiencing this issue, please get an about:memory report while the issue is occurring and attach the file to this bug. You can select "anonymize" to have it not show the URLs of the pages you have loaded. Thanks.

Flags: needinfo?(ferdinand.vktr)
Attached file memory-report.json.gz —

Here's a reproduction of the latest Firefox build(112.0.1 64-bit) without running any plugins. The steps I followed to cause it was as follows:
(I tried to come up with a way to simulate how I first came across the bug)

  1. Go to youtube home page
  2. Play a video in a new tab
  3. Play another video in a new tab
  4. Play another video in a new tab
  5. Close a video tab
  6. Repeat until memory usage becomes excessive

In this case I didn't have a lot of time to replicate it and only spent about 20 minutes on it, but over the course of a day of occasionally watching videos and then closing the tab it can bloat. In my experience the memory usage will keep growing and never stop.

Hope this helps!

Flags: needinfo?(ferdinand.vktr)

These are the main things that stand out, from the GPU process:
2,037.11 MB ── gpu-committed
1,972.29 MB ── gpu-shared

Also maybe this, from address-space
│ └──────4,601.34 MB (00.00%) ── private(segments=1918)
└────────2,837.45 MB (00.00%) ++ commit

shmem is not high at all

I've linked a few other bugs in the see also of bug 1818982 that have similar symptoms (high gpu-committed and gpu-shared, but no other real symptoms in the memory report).

See Also: → 1818982
Summary: GPU Memory Not Being Released → High memory usage of gpu-committed and gpu-shared with YouTube
See Also: → 1832067
Attached file memory-report.json.gz —

I am having the same issue, please see attached example memory reports before and after GC and CC, which reduced GPU memory usage from 4GB to 3.5GB. This problem accumulates over time and so far the highest I've seen it get to is 20GB and caused my system to crash.

Currently I am having to restart firefox at least once a day in order to avoid system unresponsivness and crashes, even with extremely high end hardware:

i9-12900HK
32GB DDR5 memory
RTX 3080-Ti (laptop)

I believe I also have similar issues on my Desktop, but will need to confirm.

There seem to be many other bug reports with similar issues for example: https://bugzilla.mozilla.org/show_bug.cgi?id=1827696

Flags: needinfo?(sotaro.ikeda.g)

Firefox 126.0 (Build ID 20240509170740) mozilla-MSIX Windows 11
AMD Ryzen 7 PRO 6850U with Radeon Graphics

Firefox open for a while, browsing, watching videos when computer goes

"You're running low on disk space"

gpu process sitting at over 20GB reserved memory -> about:memory screenshot

xse, can you check if the problem happen with latest nightly? It looks similar to Bug 1897006.

Flags: needinfo?(xse)
See Also: → 1897006

Yep, looks fixed in nightly 128.0a1 Build ID 20240521213834

Flags: needinfo?(xse)

Great! Thank you for the confirmation.

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

Attachment

General

Created:
Updated:
Size: