Open Bug 1766049 Opened 2 years ago Updated 6 days ago

Poor SWGL performance in Firefox on Linux running in VMWare

Categories

(Core :: Graphics, defect, P3)

Firefox 101
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: modreview, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 1 obsolete file)

Attached file Copy of the about:support page (obsolete) —

Steps to reproduce:

I installed a Kali Linux virtual machine (downloaded from their website; other Linux VMs with a similar setup, Debian/XFCE will very likely behave similarly) and ran it using VMWare 16 Workstation Player (version 16.2.3) with 3D Hardware Acceleration enabled. I then installed and ran Firefox Nightly in that virtual machine.

I visited about:support, and scrolled down and up on that page.
I also visited some other websites (some which include animations).

As a second test, I enabled gfx.webrender.all in about:config.

Actual results:

The scrolling animation was very choppy. and the CPU usage of the virtual machine (4 cores assigned) was about 50-90% while scrolling. Any animations playing on any of the visited websites were also really slow, and also increased CPU usage; suggesting that software acceleration is being used.

After changing gfx.webrender.all, Firefox was still using WebRender (Software), but printed some errors in the console which should also be available in the about:support copy added as an attachment.

Expected results:

Both the scrolling animation and the animations playing on the visited websites should have been played smoothly.

As a comparison; Chromium behaves on this virtual machine as I would expect. In Chromium, hardware acceleration does work with the virtualized GPU provided by VMWare Tools; scrolling only uses about 10% CPU suggesting hardware acceleration is working there, and chrome://gpu also shows that Compositing among most other things are Hardware accelerated; that's why I think this problem is mainly caused by Firefox and not VMWare.

Profiler URL, which shows the performance of scrolling up and down on about:support: https://share.firefox.dev/3K7y6w9

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Graphics
Product: Firefox → Core

Thanks for the bug report. Could you please attach the output of running glxinfo in a terminal.

You also could try setting gfx.webrender.software and gfx.webrender.software.opengl to true, restarting, and seeing if that helps?

Flags: needinfo?(modreview)
Blocks: wr-linux
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: "Failed to create EGLContext" in Firefox on Linux running in VMWare → "Failed to create EGLContext" in Firefox on Linux running in VMWare (0x3009 EGL_BAD_MATCH + 0x3005 EGL_BAD_CONFIG)
Attached file glxinfo
Flags: needinfo?(modreview)

(In reply to Jamie Nicol [:jnicol] from comment #4)

Thanks for the bug report. Could you please attach the output of running glxinfo in a terminal.

You also could try setting gfx.webrender.software and gfx.webrender.software.opengl to true, restarting, and seeing if that helps?

Setting those flags on the latest Nightly build improves performance by a lot. I have attached the output of glxinfo to the issue.

Thanks! I can see the VM only support OpenGL 2.1, and we require 3.0 to run hardware webrender. Which is why the device is using software webrender. The gfx.webrender.software.opengl uses a hybrid of software webrender but OpenGL for compositing, so that's good it has improved your performance.

Since not being able to run hardware webrender is expected on this VM, I'll change this bug to be about the poor software webrender performance.

Lee, does anything stick out to you from the profile?

Blocks: wr-perf
No longer blocks: wr-linux
Severity: -- → S3
Flags: needinfo?(lsalzman)
Priority: -- → P3
Summary: "Failed to create EGLContext" in Firefox on Linux running in VMWare (0x3009 EGL_BAD_MATCH + 0x3005 EGL_BAD_CONFIG) → Poor SWGL performance in Firefox on Linux running in VMWare (0x3009 EGL_BAD_MATCH + 0x3005 EGL_BAD_CONFIG)
Summary: Poor SWGL performance in Firefox on Linux running in VMWare (0x3009 EGL_BAD_MATCH + 0x3005 EGL_BAD_CONFIG) → Poor SWGL performance in Firefox on Linux running in VMWare

Nothing in the profile looks like its out of place. The only real overhead is in compositing, since it is doing the compositing in software using XShm.

Flags: needinfo?(lsalzman)
Blocks: wr-perf-graveyard
No longer blocks: wr-perf
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: