Closed Bug 1638058 Opened 4 years ago Closed 2 years ago

Enable video in a Google Meet call makes Nightly stutter and hang.

Categories

(Core :: WebRTC, defect, P3)

78 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED WORKSFORME
Performance Impact high
Tracking Status
firefox78 --- affected

People

(Reporter: alex_mayorga, Unassigned)

References

(Blocks 2 open bugs, )

Details

(Keywords: nightly-community, perf:responsiveness, Whiteboard: [wfh])

Basic information

Steps to Reproduce:

Enable video in a Google Meet call.

Expected Results:

A normal video call.

Actual Results:

Firefox stutters and hangs after the video feed is open for a while.


More information

Screenshot: N/A

Profile URL: https://perfht.ml/3cyBIY7

Basic systems configuration:

OS version: Windows 10 Pro Insider Preview 19613.1000

GPU model:

Number of cores: 4

Amount of memory (RAM): 24GB

Thanks so much for your help.

I see a lot of GC happening, including a 6.5s GC major and 2s slices. Jon, do you have any ideas?

Flags: needinfo?(jcoppeard)
Whiteboard: [wfh]

That 2s slice looks bad. The GC reason is USER_INACTIVE which indicates that the browser thinks the user is not active and so has triggered a potentially slow compacting GC. I guess we need a way to either inhibit the user inactive signal if the user is doing something that requires the browser to be repsonsive, even if they aren't actually interacting with it, or some other way to tell that this is happening.

Flags: needinfo?(jcoppeard)

I agree the GCs on Web Content 4/8 look bad, but I don't think that's the main issue - I think Web Content 4/8 only runs background tabs.

The actual problem seems to be in Web Content 3/8: https://share.firefox.dev/3gpFFR9
There's an eight second hang where the main thread is waiting on a WebRTC lock, in PeerConnectionImpl::SetRemoteDescription. The same happens two more times, each hanging multiple seconds. Other hangs happen during WebrtcVideoConduit::PollStats and the rtc::TaskQueue constructor. It seems that some WebRTC threads are completely overwhelmed.

Component: Performance → WebRTC
Whiteboard: [wfh] → [wfh][qf:p1:responsiveness]

It looks like webrtc::CallStats::RegisterStatsObserver and webrtc::CallStats::DeregisterStatsObserver are taking a lot of time. Coupled with the mention of WebrtcVideoConduit::PollStats in comment 3, it seems that stats code is part of the issue.

Nico, any idea off the top of your head on what would cause us to hang in webrtc.org stats code?

Flags: needinfo?(na-g)

Not off the top of my head, I think that this is just another reason to get rid of the stats polling.

Flags: needinfo?(na-g)
Severity: -- → S2
Priority: -- → P2
Blocks: webrtc-perf

Setting this to P1 for investigation and analysis so we can determine its true impact to the user.

Priority: P2 → P1

Hey Paul, I think this is another instance of the bug we discussed yesterday. Do you have a bug # to dupe this to?

Flags: needinfo?(padenot)
Blocks: media-triage

Waiting on the uplift to land so we can generate new profiles with the new library.

Flags: needinfo?(padenot)
Blocks: webrtc-triage
No longer blocks: media-triage

Hey Alex, could you test in our Nightly builds and see if you can still reproduce?

Flags: needinfo?(alex_mayorga)
Severity: S2 → S4
Priority: P1 → P3

The recent uplift should have helped here. We'll follow up once we get into video playback performance work for 2022.

No longer blocks: webrtc-triage
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(alex_mayorga)
Performance Impact: --- → P1
Whiteboard: [wfh][qf:p1:responsiveness] → [wfh]
You need to log in before you can comment on or make changes to this bug.