Closed Bug 1307018 Opened 8 years ago Closed 8 years ago

Firefox janking on apparent GC and cycle collection

Categories

(Core :: JavaScript: GC, defect)

50 Branch
x86_64
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1306128

People

(Reporter: bryce, Unassigned)

References

Details

Attachments

(5 files)

I'm seeing janks on my Mozilla laptop as well as my home computer that appear to be caused by GC and cycle collection. These appear to get worse the longer a FireFox session is running as well as with number of pages I've opened. It's particularly bad if I've had a session running for a day or more. Performance is greatly improved by restarting FF, even if restoring all the same windows and tabs.

Find attached the about config from my laptop, where I do most of my profiling of this. To follow are a number of logs from the laptop.
Attachment #8796992 - Attachment description: About config from laptop → About support from laptop
Attachment #8796992 - Attachment filename: AboutConfig.2016.10.03.txt → AboutSupport.2016.10.03.txt
Thanks for the bug report. 

These GCs are full non-incremental GCs triggered by the memory pressure notification so my initial reaction is that this is just an OOM situation.

However this is the second report I've seen of this recently so I'm suspicious that something has changed.  Maybe this is taking longer or maybe it's happening more frequently.

Telemetry shows MEMORY_PRESSURE GCs are happening more frequently in FF52, but this report is for version 49.

Looking the profiles, we're doing a lot of work:
 - full non-incremental GC including compacting
 - repeat the above due to the loop in GCRuntime::collect() (I guess due to |poked && cleanUpEverything| condition)
 - cycle collection
 - full non-incremental GC again, due to second call in nsJSEnvironmentObserver::Observe()

Some possible approaches to improving this situation:
 - don't repeat GC in collect() unless we're shutting down (as I think was originally intended)
 - don't always compact zones if it's an OOM reason (see ShouldRelocateZone())
 - don't compact if we know we're about to collect again
Andrew, do you happen to know if there's been any change to the way memory pressure events work recently?
Flags: needinfo?(continuation)
(In reply to Jon Coppeard (:jonco) from comment #6)
> Andrew, do you happen to know if there's been any change to the way memory
> pressure events work recently?

Bug 1306128 is similar, and has some discussion of a change in memory pressure.
Flags: needinfo?(continuation)
See Also: → 1306128
See Also: → 1308118
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: