I'm going to lay out my assumptions to investigate: * Not GPU driver specific - NVIDIA and AMD dGPUs reported here, I am not sure about iGPUs though * May be related to video decoder reuse ( bug 1890622 ) - can try toggling gfx.direct3d11.reuse-decoder-device off in about:config * May depend on whether HDR is enabled in Windows (as this alters how the dwm.exe process operates). * Ads could contribute significantly to number of total videos started in a session, if that is a trigger. * Issue takes some time to repro (~days) to become severe, but is quite severe. * Could depend on whether dcomp is used (gfx.webrender.dcomp-win.enabled) as that may significantly alter the refcounting of DXGI objects and nearly eliminates sharing swapchains with dwm.exe as there is just one per window. * Could depend on whether DXGIVirtualSurface is used (gfx.webrender.dcomp-use-virtual-surfaces), as that feature is only used by Firefox and likely some XAML and UWP apps. * May be measurable in Task Manager -> Performance -> GPU -> Dedicated GPU memory usage and Shared GPU memory usage graphs * After closing tabs on a long-running Firefox Nightly browser, system memory usage is at 20.8GiB/63.7GiB, Shared GPU memory usage is at 1.3/31.9GiB. * May be measurable in Task Manager -> Details -> Dedicated GPU memory usage, Shared GPU memory usage * To enable these columns, right click on any column title and choose select columns, scroll down and check relevant boxes. * Dedicated GPU memory usage column can be unreliable according to https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/gpu-process-memory-counters-report-wrong-value but the Performance pane is reliable. * Shared GPU memory usage on processes can count memory multiple times for compositor surfaces shared across processes and such things according to https://devblogs.microsoft.com/directx/gpus-in-the-task-manager/ but there is no advisory that it is fundamentally unreliable, unlike the Dedicated GPU memory usage column. * Note: On my system after leaving Firefox running for a week in usual office usage patterns (gmail, calendar, zoom calls, etc) with a considerable number of open tabs (bugzilla), Shared GPU memory usage is at 44,397,168KiB (which is physically possible using swapfile but seems unlikely as the swapfile is sitting at 16MiB) and does not go down much if I close tabs. But Shared GPU memory usage in the Performance tab shows only 1.4GiB/32GiB shared GPU memory in use, down from 4.1GiB before closing all but one tab (this one). 1.4GiB still seems like more than I'd expect for a single Firefox Nightly tab and the Windows Task Manager window though. Shared GPU memory reported on dwm.exe (Desktop Window Manager) is 4,177,956KiB, which is also more than the Performance tab shows for that metric. So I have significant doubts about the accuracy of Shared GPU memory usage in this Details tab.
Bug 1847453 Comment 39 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I'm going to lay out my assumptions to investigate: * Not GPU driver specific - NVIDIA and AMD dGPUs reported here, I am not sure about iGPUs though * May be related to video decoder reuse ( bug 1890622 ) - can try toggling gfx.direct3d11.reuse-decoder-device off in about:config * May depend on whether HDR is enabled in Windows (as this alters how the dwm.exe process operates). * Ads could contribute significantly to number of total videos started in a session, if that is a trigger. * Issue takes some time to repro (~days) to become severe, but is quite severe. * Could depend on whether dcomp is used (gfx.webrender.dcomp-win.enabled) as that may significantly alter the refcounting of DXGI objects and nearly eliminates sharing swapchains with dwm.exe as there is just one per window. * Could depend on whether DXGIVirtualSurface is used (gfx.webrender.dcomp-use-virtual-surfaces), as that feature is only used by Firefox and likely some XAML and UWP apps. * May be measurable in Task Manager -> Performance -> GPU -> Dedicated GPU memory usage and Shared GPU memory usage graphs * On this work laptop (Intel iGPU + NVIDIA) after closing tabs on a long-running Firefox Nightly browser, system memory usage is at 20.8GiB/63.7GiB, Shared GPU memory usage is at 1.3/31.9GiB. Closing that browser and reopening it (same tab after reopening the browser) puts system memory usage at 20.4/63.7Gib and GPU 0 Shared GPU memory usage at 1.2/31.9GiB, so no appreciable leak in these metrics which we consider to be reliable. Also no change in size of pagefile.sys or swapfile.sys, which indicates that if any leaks occurred, they were not sufficient to cause swapping in this case. * May be measurable in Task Manager -> Details -> Dedicated GPU memory usage, Shared GPU memory usage * To enable these columns, right click on any column title and choose select columns, scroll down and check relevant boxes. * Dedicated GPU memory usage column can be unreliable according to https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/gpu-process-memory-counters-report-wrong-value but the Performance pane is reliable. * Shared GPU memory usage on processes can count memory multiple times for compositor surfaces shared across processes and such things according to https://devblogs.microsoft.com/directx/gpus-in-the-task-manager/ but there is no advisory that it is fundamentally unreliable, unlike the Dedicated GPU memory usage column. * Note: On this work laptop after leaving Firefox running for a week in usual office usage patterns (gmail, calendar, zoom calls, etc) with a considerable number of open tabs (bugzilla), Shared GPU memory usage is at 44,397,168KiB (which is physically possible using swapfile but seems unlikely as the swapfile is sitting at 16MiB) and does not go down much if I close tabs. But Shared GPU memory usage in the Performance tab shows only 1.4GiB/32GiB shared GPU memory in use, down from 4.1GiB before closing all but one tab (this one). 1.4GiB still seems like more than I'd expect for a single Firefox Nightly tab and the Windows Task Manager window though. Shared GPU memory reported on dwm.exe (Desktop Window Manager) is 4,177,956KiB, which is also more than the Performance tab shows for that metric. So I have significant doubts about the accuracy of Shared GPU memory usage in this Details tab.