Last Comment Bug 606855 - [OpenGL] On linux, HWACCEL benchmark runs slower with layers acceleration
: [OpenGL] On linux, HWACCEL benchmark runs slower with layers acceleration
Status: RESOLVED FIXED
: perf
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86_64 Linux
: -- normal with 1 vote (vote)
: mozilla6
Assigned To: Matt Woodrow (:mattwoodrow) (PTO until 27 June)
:
Mentors:
: 642694 (view as bug list)
Depends on: 640082 658921
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-24 15:51 PDT by Benoit Jacob [:bjacob] (mostly away)
Modified: 2011-09-09 15:11 PDT (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
Check extensions (998 bytes, patch)
2011-05-10 19:59 PDT, Matt Woodrow (:mattwoodrow) (PTO until 27 June)
jacob.benoit.1: review+
Details | Diff | Review

Description Benoit Jacob [:bjacob] (mostly away) 2010-10-24 15:51:57 PDT
This benchmark:
  http://demos.hacks.mozilla.org/openweb/HWACCEL/

gives me 73 FPS with layers.accelerate-all=false, and 21 FPS with layers.accelerate-all=true.

This is on linux x86-64 with NVIDIA proprietary driver.

Details:

Fedora 13
OpenGL renderer string: Quadro FX 880M/PCI/SSE2
OpenGL version string: 3.2.0 NVIDIA 195.36.31
Comment 1 Karl Tomlinson (ni?:karlt) 2010-10-27 13:16:45 PDT
Re other drivers, Mesa has a 4096 pixel limit on texture dimensions, so 640x7760 textures are going to cause problems.
Comment 2 maximi89 2010-10-27 17:03:43 PDT
This benchmark:
  http://demos.hacks.mozilla.org/openweb/HWACCEL/

gives me 5 to 13FPS with layers accelerated, without it the same :D
i'm using radeon opensource drivers, 

OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Mesa DRI R600 (RS780 9612) 20090101  TCL
OpenGL version string: 2.1 Mesa 7.9
OpenGL shading language version string: 1.20

With "nomodeset" in boot line i get better performance with Mozilla hwaccel demo test, using Minefield 4.0b8pre
Comment 3 maximi89 2010-10-27 17:04:29 PDT
Sorry, in my case i'm using HD 3200 graphic card.
Fedora 14 64 bits
Comment 4 Erdem U. Altinyurt 2010-12-02 17:36:44 PST
Using Radeon 6850 with FGLRX 10.11, gives 16FPS.
More than software which gives 10fps but I got huge lacks, they don't moving smooth. Also CPU hits to %100 (just for one core)

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 6800 Series
OpenGL version string: 4.0.10317 Compatibility Profile Context
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2011-03-21 03:59:22 PDT
*** Bug 642694 has been marked as a duplicate of this bug. ***
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2011-04-27 06:30:08 PDT
This has been fixed by bug 640082 - use texture_from_pixmap.
Comment 7 donrhummy 2011-04-27 09:14:11 PDT
(In reply to comment #6)
> This has been fixed by bug 640082 - use texture_from_pixmap.

How can I test this out? Can you provide a link to a download of firefox with this fix and instructions to properly test this fix to HWAccel on my linux comp?
Comment 8 Benoit Jacob [:bjacob] (mostly away) 2011-04-27 10:43:09 PDT
This is in Nightly.
http://nightly.mozilla.org/

Just go to about:config and set layers.acceleration.force-enabled=true. On non-NVIDIA drivers, you also need to run with the MOZ_GLX_IGNORE_BLACKLIST environment variable defined, though that need will be removed around tomorrow (bug 645407).

GL accelerated layers are still not enabled by default on X11 because of some visual glitches, which we hope will be resolved for Firefox 6.
Comment 9 donrhummy 2011-04-27 11:07:07 PDT
(In reply to comment #8)
> This is in Nightly.
> http://nightly.mozilla.org/
> 
> Just go to about:config and set layers.acceleration.force-enabled=true. On
> non-NVIDIA drivers, you also need to run with the MOZ_GLX_IGNORE_BLACKLIST
> environment variable defined, though that need will be removed around tomorrow
> (bug 645407).

OK, I *guess* you can call this fixed since HWACCEL is no longer SLOWER than no HW acceleration, BUT it's also not faster. 

Testing on ttp://demos.hacks.mozilla.org/openweb/HWACCEL/ with an NVIDIA GeForce 8400 GS, I get:

WITHOUT HWACCEL: 16-17fps (ran it 3 times)
WITH HWACCEL: 14-17fps (ran it 3 times)

So, while my NVIDIA isn't the most amazing on the block, it's also not ****. Why is there no gain from HWACCEL?
Comment 10 donrhummy 2011-04-27 11:09:36 PDT
And running more tests...

Using this page: http://ie.microsoft.com/testdrive/Performance/FishBowl/Default.html

It's FASTER without the "layers.acceleration.force-enabled=true":

WITH: 28-32fps (10 fish)
WITHOUT: 41-43fps (10 fish)
Comment 11 Benoit Jacob [:bjacob] (mostly away) 2011-04-27 11:15:09 PDT
(In reply to comment #9)
> (In reply to comment #8)
> > This is in Nightly.
> > http://nightly.mozilla.org/
> > 
> > Just go to about:config and set layers.acceleration.force-enabled=true. On
> > non-NVIDIA drivers, you also need to run with the MOZ_GLX_IGNORE_BLACKLIST
> > environment variable defined, though that need will be removed around tomorrow
> > (bug 645407).
> 
> OK, I *guess* you can call this fixed since HWACCEL is no longer SLOWER than no
> HW acceleration, BUT it's also not faster. 
> 
> Testing on ttp://demos.hacks.mozilla.org/openweb/HWACCEL/ with an NVIDIA
> GeForce 8400 GS, I get:
> 
> WITHOUT HWACCEL: 16-17fps (ran it 3 times)
> WITH HWACCEL: 14-17fps (ran it 3 times)

Same here: I get 60+ FPS in both cases (NVIDIA on a Quadro FX 880M, Core i7) so I can't see a noticeable difference.

> 
> So, while my NVIDIA isn't the most amazing on the block, it's also not ****.
> Why is there no gain from HWACCEL?

No clue, perhaps our CPUs are just fast enough to do the compositing 60 times per second so that this benchmark is not demanding enough to let layers acceleration make a visible difference.

The only thing that was a clear bug was when enabling layers was measurably slower; that's fixed on this demo.

(In reply to comment #10)
> And running more tests...
> 
> Using this page:
> http://ie.microsoft.com/testdrive/Performance/FishBowl/Default.html
> 
> It's FASTER without the "layers.acceleration.force-enabled=true":
> 
> WITH: 28-32fps (10 fish)
> WITHOUT: 41-43fps (10 fish)

Interesting: please open a separate bug about that, and CC me.
Comment 12 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-04-27 11:17:25 PDT
As far as comment 9 goes, your "without hwaccel" numbers are already hardware-accelerated via Render and have been for a good long while.  Assuming your Render actually works correctly, etc.  This bug was just about the layers acceleration interfering with the content acceleration Render is already doing.  Comment 0 and the bug summmary are pretty clear on this.

Comment 10 should probably be filed as a separate bug.
Comment 13 donrhummy 2011-04-27 11:49:36 PDT
> Interesting: please open a separate bug about that, and CC me.
Done. https://bugzilla.mozilla.org/show_bug.cgi?id=653206

Thanks for the help/comments. :)
Comment 14 Benoit Jacob [:bjacob] (mostly away) 2011-05-09 05:36:20 PDT
I checked again today, and this has regressed on my machine. Reopening.

With OpenGL layers: 23 FPS
Without OpenGL layers: 60 FPS

Today's Nightly
Built from http://hg.mozilla.org/mozilla-central/rev/9e31df64bfd7
Linux x86-64
NVIDIA 195.36.31
Quadro FX 880M
Comment 15 Matt Woodrow (:mattwoodrow) (PTO until 27 June) 2011-05-09 14:29:31 PDT
Benoit: Can you please check with a debugger to see if you are hitting the texture_from_pixmap paths.

I'll test this on my system too.
Comment 16 Matt Woodrow (:mattwoodrow) (PTO until 27 June) 2011-05-10 19:59:17 PDT
Created attachment 531526 [details] [diff] [review]
Check extensions

Looks like the check for extensions got removed accidentally.

I still get a slight performance regresion on HWACCEL with this patch applied (40fps vs 60fps), but the psychedelic browsing 'benchmark' gives me almost identical number.

I'll try profiling it sometime to see why.
Comment 17 Benoit Jacob [:bjacob] (mostly away) 2011-05-16 06:05:08 PDT
Comment on attachment 531526 [details] [diff] [review]
Check extensions

Sorry, that probably happened when rebasing a patch in bug 645407.
Comment 18 Matt Woodrow (:mattwoodrow) (PTO until 27 June) 2011-05-22 17:24:43 PDT
http://hg.mozilla.org/mozilla-central/rev/4b0b0441b949
Comment 19 Wayne Mery (:wsmwk, NI for questions) 2011-09-07 04:28:33 PDT
Matt, bjacob, based on checkin date I'm guessing TM should be v7. If that is incorrect, please fix the TM
Comment 20 Benoit Jacob [:bjacob] (mostly away) 2011-09-07 08:17:42 PDT
Well, Matt landed multiple improvements, some only for Firefox 9. So YMMV, this stuff has been improving continuously until Firefox 9 but this particular test might well be completely "fast" as of Firefox 7. And then again, on NVIDIA we hit a severe performance bug in the driver that we can't do anything about.
Comment 21 donrhummy 2011-09-07 09:18:23 PDT
(In reply to Benoit Jacob [:bjacob] from comment #20)
> Well, Matt landed multiple improvements, some only for Firefox 9. So YMMV,
> this stuff has been improving continuously until Firefox 9 but this
> particular test might well be completely "fast" as of Firefox 7. And then
> again, on NVIDIA we hit a severe performance bug in the driver that we can't
> do anything about.

When you say "can't do anything about," do you mean at this time, or do you mean it will never be fixable? And if so, can you give some more info on that issue?
Comment 22 Benoit Jacob [:bjacob] (mostly away) 2011-09-07 10:17:59 PDT
On the NVIDIA driver, the texture_from_pixmap extension has a severe performance issue, specifically the glXBindTexImageEXT function can be incredibly slow.

This is a long standing NVIDIA bug, NVIDIA has been contacted about it, and until it's fixed we can't enable Layers acceleration by default on linux machines with NVIDIA driver. This is doubly worrisome as all our automatic test machines ("test slaves") have NVIDIA so if we enabled Layers acceleration only for non-NVIDIA we would be without test coverage, especially for performance regressions. Sad.
Comment 23 donrhummy 2011-09-07 10:38:31 PDT
(In reply to Benoit Jacob [:bjacob] from comment #22)
> On the NVIDIA driver, the texture_from_pixmap extension has a severe
> performance issue, specifically the glXBindTexImageEXT function can be
> incredibly slow.
> 
> This is a long standing NVIDIA bug, NVIDIA has been contacted about it, and
> until it's fixed we can't enable Layers acceleration by default on linux
> machines with NVIDIA driver. This is doubly worrisome as all our automatic
> test machines ("test slaves") have NVIDIA so if we enabled Layers
> acceleration only for non-NVIDIA we would be without test coverage,
> especially for performance regressions. Sad.

Wow, that stinks. I'm assuming the NVIDIA driver is closed source?
Comment 24 Joe Drew (not getting mail) 2011-09-07 11:13:05 PDT
(In reply to Benoit Jacob [:bjacob] from comment #22)
> On the NVIDIA driver, the texture_from_pixmap extension has a severe
> performance issue, specifically the glXBindTexImageEXT function can be
> incredibly slow.

Actually, we have found a workaround in bug 680817.
Comment 25 Wayne Mery (:wsmwk, NI for questions) 2011-09-07 11:55:00 PDT
(In reply to Matt Woodrow (:mattwoodrow) from comment #18)
> http://hg.mozilla.org/mozilla-central/rev/4b0b0441b949

Thanks for all the info. My question was about this checkin because I wanted to know what version of FF it took effect.  FWIW a bug fixed in a similar time frame has TM set to mozilla6. (I forget which bug) so I figured this might have also been pushed out in FF6 or FF7

Is Target Milestone being used at all for core checkins?
Comment 26 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-09-07 12:04:33 PDT
> Is Target Milestone being used at all for core checkins?

Yes.  At least it should be.
Comment 27 donrhummy 2011-09-07 13:46:12 PDT
(In reply to Joe Drew (:JOEDREW!) from comment #24)
> (In reply to Benoit Jacob [:bjacob] from comment #22)
> > On the NVIDIA driver, the texture_from_pixmap extension has a severe
> > performance issue, specifically the glXBindTexImageEXT function can be
> > incredibly slow.
> 
> Actually, we have found a workaround in bug 680817.

What build of firefox will this be in?
Comment 28 donrhummy 2011-09-09 10:59:02 PDT
(In reply to Benoit Jacob [:bjacob] from comment #22)
> On the NVIDIA driver, the texture_from_pixmap extension has a severe
> performance issue, specifically the glXBindTexImageEXT function can be
> incredibly slow.
> 
> This is a long standing NVIDIA bug, NVIDIA has been contacted about it, and
> until it's fixed we can't enable Layers acceleration by default on linux
> machines with NVIDIA driver. This is doubly worrisome as all our automatic
> test machines ("test slaves") have NVIDIA so if we enabled Layers
> acceleration only for non-NVIDIA we would be without test coverage,
> especially for performance regressions. Sad.

Benoit Jacob, can you provide steps to recreate this? I contacted NVIDIA and they say they don't have a bug report for that issue but if we give them steps to recreate it, they'll look into trying to fix it.
Comment 29 Benoit Jacob [:bjacob] (mostly away) 2011-09-09 11:02:40 PDT
Matt told me this is fixed in the latest NVIDIA driver.

Now we're only waiting for linux test slaves to get a NVIDIA driver update. What's the bug # for this?
Comment 30 donrhummy 2011-09-09 11:28:24 PDT
(In reply to Benoit Jacob [:bjacob] from comment #29)
> Matt told me this is fixed in the latest NVIDIA driver.
> 
> Now we're only waiting for linux test slaves to get a NVIDIA driver update.
> What's the bug # for this?

The guy at NVIDIA hasn't filed it yet. He's waiting for steps to reproduce. Should I tell him not to bother?
Comment 31 Benoit Jacob [:bjacob] (mostly away) 2011-09-09 11:46:35 PDT
^ Matt, please reply to this!
Comment 32 Matt Woodrow (:mattwoodrow) (PTO until 27 June) 2011-09-09 15:11:52 PDT
See the comment from James Jones at NVidia at https://bugzilla.mozilla.org/show_bug.cgi?id=680817#c5

The poor performance of glXBindTexImageEXT still exists in the newer drivers, but they have suggested a slightly different usage model to avoid calling this as much.

This fixes the performance regressions for me, but causes other failures (double freeing memory and X errors) on our test machines. I've filed a bug asking for the drivers on the test machines to be updated, and am hoping that this will fix the remaining issues.

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