Closed Bug 1730768 Opened 3 years ago Closed 3 years ago

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1010527
Performance Impact low
Tracking Status
firefox94 --- affected

People

(Reporter: botond, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf:resource-use)

Basic information

Steps to Reproduce

  1. Load https://portlandsto.ca/interactive-project-map/
  2. Leave the page open without interacting with it

Expected Results

Given that I'm not interacting with the page, and nothing on the page is moving, I would expect CPU usage to be relatively low.

Actual Results

CPU usage is high (~70% of a core, fan spinning at high speed).

In Chrome, CPU usage on this page is lower but nonzero (~30% of a core, fan spinning at a lower speed).


More information

Profile URL: https://share.firefox.dev/2VFOzEy

Basic systems configuration:

OS version: Debian 10

GPU model: Intel HD Graphics 5500

Number of cores: 2 (4 threads)

Amount of memory (RAM): 8 GB

Whiteboard: [qf:p3:resource]

It looks like there is a WebGL animation, and the slow part is reading back the canvas in the content process and copying it into a shmem. Don't we have a fast path for compositing WebGL on Linux? What's preventing us from using it on this machine / in this configuration?

Component: Performance → Graphics: WebRender

Please attach about:support.
Gbm/Dmabuf WebGL is available on EGL:

  • Wayland (MOZ_ENABLE_WAYLAND=1) with Mesa or with proprietary Nvidia driver >= 495.
  • X11 & Xwayland with Mesa >= 21 (bug 1695933, should be lowered)

needinfo for comment 2

Flags: needinfo?(botond)

(In reply to Botond Ballo [:botond] from comment #0)

OS version: Debian 10

That's Debian oldstable: https://packages.debian.org/buster/libegl-mesa0

You can enable EGL by setting gfx.x11-egl.force-enabled to true and restarting Nightly.
(widget.dmabuf-webgl.enabled is already true, but has only effect when using EGL.)
Does EGL help?

MOZ_LOG="Dmabuf:5"
EGL/Gbm/Dmabuf WebGL works if your log looks like this:

[Child 4488: Main Thread]: D/Dmabuf nsDMABufDevice::Configure()
[Child 4488: Main Thread]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[Child 4488: Main Thread]: D/Dmabuf DMABuf is enabled, using drm node /dev/dri/renderD128

[Child 4488: Main Thread]: D/Dmabuf Creating without modifiers
[Child 4488: Main Thread]: D/Dmabuf Success
[Child 4488: Main Thread]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 130
[Child 4488: Main Thread]: D/Dmabuf DMABufSurfaceRGBA::Serialize() UID 132
[Parent 4108: Compositor]: D/Dmabuf DMABufSurfaceRGBA::ImportSurfaceDescriptor() UID 131 size 1024 x 1024
[Parent 4108: Compositor]: D/Dmabuf DMABufSurfaceRGBA::ImportSurfaceDescriptor() UID 132 size 1024 x 1024
[Parent 4108: Renderer]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 130
[Parent 4108: Renderer]: D/Dmabuf DMABufSurface::ReleaseDMABuf() UID 131

(In reply to Darkspirit from comment #4)

You can enable EGL by setting gfx.x11-egl.force-enabled to true and restarting Nightly.
(widget.dmabuf-webgl.enabled is already true, but has only effect when using EGL.)
Does EGL help?

I can confirm that enabling EGL reduces CPU usage on this page to ~40%, which is more comparable to Chrome. Thanks!

Flags: needinfo?(botond)
Severity: -- → S3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Performance Impact: --- → P3
Whiteboard: [qf:p3:resource]
You need to log in before you can comment on or make changes to this bug.