Bug 180338 - Speedometer grows the heap linearly and leaves ~200MB of unreclaimed memory when it finishes
Summary: Speedometer grows the heap linearly and leaves ~200MB of unreclaimed memory w...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-03 14:47 PST by Filip Pizlo
Modified: 2018-01-10 19:07 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2017-12-03 14:47:25 PST
It's runs/sec also degrade as we proceed through the iterations, presumably because GCs start to take a really long time.  Hilariously, if you "test again", we will keep growing the heap.

Dunno if it's a leak in Speedometer or in our engine.  Making it a JSC bug for now.
Comment 1 Ryosuke Niwa 2017-12-03 21:05:59 PST
Hm... we should probably check the leak in other engines like Chrome to see if this is a benchmark issue vs engine issue.
Comment 2 Radar WebKit Bug Importer 2017-12-12 15:53:09 PST
<rdar://problem/36007410>
Comment 3 Ryosuke Niwa 2017-12-15 13:49:46 PST
I've measured this in Chrome using heap snapshots. Their memory usage starts off at ~4MB then goes up to ~24MB but stabilizes around that range at the end. I've also monitored the process's memory usage, and they do go up to ~200MB but stays there the whole time, and re-running the test doesn't increased the memory usage.
Comment 4 Ryosuke Niwa 2017-12-15 14:00:12 PST
I've also measured this in Firefox. Their memory usages starts off around 500MB and goes up to ~580MB. In the second run, however, it can go up to ~680MB despite of the fact their usage temporarily dropped to ~510MB at the beginning of the test. The leak memory usage in the third run is stays around ~720MB but then drops to 520MB if I wait ~5s after the test had finished running. So I suspect this isn't the same leak we're seeing but more about their memory getting fragmented over time, or that their GC/malloc holding onto more pages in later runs.
Comment 5 Ryosuke Niwa 2017-12-20 19:41:08 PST
As far as I can tell, we're leaking every window object in both Speedometer 1 & Speedometer 2.
Comment 6 Ryosuke Niwa 2018-01-10 17:21:39 PST
Saam and I looked into this, and we can no longer reproduce it. It looks like this reproduces when Inspector is open so it's possible we both had Web Inspector open when we did the measurement?

Regardless, there isn't anything actionable here.
Comment 7 Joseph Pecoraro 2018-01-10 19:06:03 PST
If this is Web Inspector only, does the memory at least get reclaimed when Web Inspector closes?
Comment 8 Saam Barati 2018-01-10 19:07:34 PST
(In reply to Joseph Pecoraro from comment #7)
> If this is Web Inspector only, does the memory at least get reclaimed when
> Web Inspector closes?

Yes, we think it's inspector only. The memory does get reclaimed after a few seconds when inspector closes.