Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows memory usage and graphics drivers

34 views
Skip to first unread message

Gabriele Svelto

unread,
May 18, 2018, 11:13:04 AM5/18/18
to dev-te...@lists.mozilla.org
Hello all,
I'm studying an issue we're experiencing on Windows 64-bit builds and
since it might be graphics-related I was wondering if anyone could help
me out with it.

We've experienced an uptick in OOM crashes on Windows 64-bit builds with
version 58 and while investigating this phenomenon [1] I found that the
cause of the crashes was not what I expected. Many of the crash pings we
received showed the machines still having plenty of physical memory
available (sometimes multiple gigabytes) but were running out of commit
space instead.

In Windows parlance commit space is the amount of memory that a process
has reserved for itself even though it might not be using it. Windows
assumes that the maximum commit space available is physical memory plus
the swap space. To get in a situation where you run out of commit-space
one needs to reserve plenty of memory using VirtualAlloc()'s MEM_COMMIT
parameter but then never touch it. Generally speaking neither the JS GC
nor our regular allocator commit memory that they don't use. Both keep a
small amount of committed-but-unused memory but it's in the order of a
few MiB at most.

So I began looking at memory reports and I noticed something odd on my
machine: the processes often had a significant amount of memory
committed but not used (~100MiB per process) and it often matched the
size of the gpu-committed parameter in about:memory. This was on a
desktop machine with an Radeon RX 480. I did the same test on my laptop
using both the Intel integrated IGP and the nVidia discrete GPU. With
the former I would also see a fairly large chunk of gpu-committed
memory, but not as large as on the Radeon, and with the nVidia card the
parameter was always set to 0 yet the processes were clearly committing
a lot of memory they were not using (north of 150MiB).

Asking around I got hang of a memory-report where the GPU process had
50MiB of used memory and 450MiB of committed but unused memory. Explicit
allocations were only ~20MiB so all that memory use must have been
coming from somewhere else.

So my question is: is it possible that the GPU drivers are committing a
lots of memory behind our backs but not using it? Could there be a way
to shed some light over this consumption and possibly mitigate it?

FYI I tried turning OMTP on and off and it didn't seem to affect memory
consumption much (if at all).

Gabriele

[1] https://sql.telemetry.mozilla.org/queries/52836

signature.asc
0 new messages