Open Bug 1763265 Opened 2 years ago Updated 2 years ago

GC_SLICE_DURING_IDLE telemetry is useless and possibly misleading

Categories

(Core :: JavaScript: GC, defect, P2)

defect

Tracking

()

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

Since FIrefox 95, gc_slice_during_idle has shown 100% all of the time in GLAM. When running locally, most of my GCs reported 100%, but a handful were lower.

In looking at the logic, a < 100% value seems to be a result of either of two causes:

  1. The slice was started in idle time but overflowed its budget, and in fact overflowed the amount of idle time available
  2. The slice was started in idle time, did not overflow its budget, but there was some time spent in a slice that was triggered internally by the GC engine. This is treated as if it were overflow time.

The < 100% reports tended to be at least 50%, usually >= 80%.

Given the observed data, this probe is only useful to detect if we alter behavior significantly. It's basically a boolean. This may also be because it accumulates samples for idle browsers running all night?

I'd like to think about an alternative metric to measure something that we care about. The general question "how much of our GC happens during idle time?" is a good one. I'm not convinced this probe helps answer it.

Severity: -- → S4
Priority: -- → P2

I suspect one important thing here is that GC_SLICE_DURING_IDLE is only reported for GCs that take at least a second (GC work time, not elapsed time. According to telemetry, that's between 0.1% and 1% of all GCs.

So this metric doesn't really tell us anything about eg 100ms non-idle stalls, as long as the overall GC is still under a second.

(In reply to Steve Fink [:sfink] [:s:] from comment #1)

I suspect one important thing here is that GC_SLICE_DURING_IDLE is only reported for GCs that take at least a second (GC work time, not elapsed time.

This is wrong. I misunderstood a TimeDuration::ToSeconds() as truncating and returning an integral value. This is only skipping weirdo 0-duration GCs.

You need to log in before you can comment on or make changes to this bug.