Open Bug 1900288 Opened 2 years ago Updated 2 years ago

Higher CPU use than Chrome on twitch.tv

Categories

(Core :: Audio/Video, defect)

defect

Tracking

()

Performance Impact low

People

(Reporter: jesup, Unassigned, NeedInfo)

References

()

Details

(Keywords: perf:resource-use, top50)

Attachments

(1 file)

Attached file twitch_chrome.tgz —

​​### Basic information

Steps to Reproduce:
Browse to a popular stream on twitch.tv with lots of commenting (may not be required).

Expected Results:
Similar CPU use to Chrome

Actual Results:
Higher CPU use: ~150% of a core on my threadripper across ~3 processes (content ~60-80%, parent 40-50%, and RDD 30-45%), versus 50-75% for Chrome (2 processes, renderer ~40-60% and GPU 10-15%)


Performance recording (profile)

Profile URL: https://share.firefox.dev/4e2Kv4H
Chrome profile to be attached

System configuration:

OS version: Fedora 39
GPU model: AMD Radeon Pro W6600 (radeonsi, navi23, LLVM 17.0.6, DRM 3.57, 6.8.7-200.fc39.x86_64)
Number of cores: 32
Amount of memory (RAM): 64GB

More information

Please consider attaching the following information after filing this bug, if relevant:

  • Screenshot / screen recording
  • Anonymized about:memory dump, for issues with memory usage
  • Troubleshooting information: Go to about:support, click "Copy text to clipboard", paste it to a file, save it, and attach the file here.

Thanks so much for your help.

Summary: Higher CPU use than Chrome on twitch.yv → Higher CPU use than Chrome on twitch.tv

This is the URL I used; it was chosen randomly from the then-current high-viewer channels. ~80K viewers.

FYI about the RDD performance vs Chrome's GPU performance. RDD process shows no CPU use on MainThread, so it must all be on background threads? Perhaps we're using SW decoding and Chrome is HW?

Flags: needinfo?(padenot)
Flags: needinfo?(apehrson)

On my mac I see twitch video being H264, which should be hw decoded where supported. Linux might not be as common as the other platforms, though. Randell, could you capture a media profile (from about:logging for completion)? Also, about:support should say what is supported in terms of playback decoding.

If the parent process shows high-ish CPU it's probably related to rendering the decoded frames. RDD being high should indicate sw decoding.

FWIW RDD (also for receiving IPC messages) sets up decoders on the MediaSupervisor thread pool and handles decoding on the MediaDecoder thread pool.

Flags: needinfo?(apehrson) → needinfo?(rjesup)

Fedora doesn't support H264 HW decoding:
Codec Name Software Decoding Hardware Decoding
H264 Supported Unsupported

Flags: needinfo?(rjesup)

We need a media profile for this. Jeff has profiled twitch.tv over the years, I'm not sure if what we see here is expected or if he can just dupe this bug.

Flags: needinfo?(padenot) → needinfo?(jmuizelaar)

On windows, with a AMD fairly high end GPU, I see 3-10% CPU (not core use - this was on a AMD 3600 CPU, 6x2 cores) use in Process Explorer across 2(?) processes. Chrome shows 1.5-7% I'd guess. So dramatically lower CPU use for both. The original report I was trying to check was from a user on reddit with an older CPU (and one would guess GPU) who showed huge differences in CPU use.

One big difference I do see on windows is that Firefox constantly is switching between 1080p60 and down to 360p. Chrome just sits at 1080p

https://share.firefox.dev/4aRtGGR

RDD process in the profile is using ~0%, but in the system monitor it's using ~50% of a core
https://www.twitch.tv/symfuhny is the current URL I'm using

The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Websites affected: Major
Resource impact: Some

Performance Impact: ? → low
Component: Performance → Audio/Video

I wonder if mse in workers would help here.

Severity: -- → S3

Randell can you reproduce the same problem on Windows?

Flags: needinfo?(jmuizelaar) → needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: