Open Bug 1815149 Opened 3 years ago Updated 1 year ago

Constant increase in memory on demo https://www.fxhash.xyz/generative/11858

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned, NeedInfo)

References

(Blocks 1 open bug, )

Details

Attachments

(2 files)

Attached file memory-report.json.gz —

Look at : webIsolated=https://fxhash2.xyz (pid 70472)

Attached file about:support —

Ok, I'm really not sure what's going on.

The profiler+about:memory disagree with devtools' memory panel. The former two report gigabytes of memory (and constant GC to boot), but the latter only reports about 45mb of heap; this corresponds to what Chrome's memory snapshot tool also reports... but I'm not sure if there is something fundamental that I'm just missing.

I suspect this is just a leaky site, but I would love to be able to see if that was actually the case in another browser or not...

Flags: needinfo?(jcoppeard)

Looks like array buffer contents:

1,593.40 MB (100.0%) -- explicit
├──1,587.57 MB (99.63%) -- window-objects/top(https://gateway.fxhash2.xyz/ipfs/QmXm5ggPjUgYPcG87ForxiasZAThxyScQKFGQbMsJRvZEC/?fxhash=ooMQk1Bab5hFtVUHKbrztZr37T9dttp3n3nzUMK1N2TZ4XtzXuF, id=43)
│  ├──1,585.51 MB (99.50%) -- active/window(https://gateway.fxhash2.xyz/ipfs/QmXm5ggPjUgYPcG87ForxiasZAThxyScQKFGQbMsJRvZEC/?fxhash=ooMQk1Bab5hFtVUHKbrztZr37T9dttp3n3nzUMK1N2TZ4XtzXuF)
│  │  ├──1,584.97 MB (99.47%) -- js-realm(https://gateway.fxhash2.xyz/ipfs/QmXm5ggPjUgYPcG87ForxiasZAThxyScQKFGQbMsJRvZEC/?fxhash=ooMQk1Bab5hFtVUHKbrztZr37T9dttp3n3nzUMK1N2TZ4XtzXuF)
│  │  │  ├──1,584.04 MB (99.41%) -- classes
│  │  │  │  ├──1,582.04 MB (99.29%) -- class(ArrayBuffer)/objects
│  │  │  │  │  ├──1,582.03 MB (99.29%) ── malloc-heap/elements/normal

I'm not seeing constantly increasing memory though. Memory use rises, there's a GC and it falls again. Although not all GCs reduce memory by that much. And not really until after the first CC, but then subsequent ones seem more effective.

So one issue may be that although we're scheduling GCs because of high volume of malloc allocations, we don't schedule CC based on this so those GCs may not be effective.

Profile with latest Nightly: https://share.firefox.dev/45OkZeD
The memory increases, then decreases by GC/cc. But not enough memory is being freed in gc/cc. So there is a slow increase in memory.

Blocks: GC.stability
Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: