Closed Bug 606855 Opened 14 years ago Closed 13 years ago

[OpenGL] On linux, HWACCEL benchmark runs slower with layers acceleration

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6
Tracking Status
blocking2.0 --- -

People

(Reporter: bjacob, Assigned: mattwoodrow)

References

Details

(Keywords: perf)

Attachments

(1 file)

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
blocking2.0: --- → ?
blocking2.0: ? → -
Re other drivers, Mesa has a 4096 pixel limit on texture dimensions, so 640x7760 textures are going to cause problems.
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
Sorry, in my case i'm using HD 3200 graphic card.
Fedora 14 64 bits
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
Depends on: 640082
This has been fixed by bug 640082 - use texture_from_pixmap.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
(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?
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.
(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?
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)
(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.
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.
> 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. :)
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
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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.
Attached patch Check extensionsSplinter Review
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.
Attachment #531526 - Flags: review?(bjacob)
Comment on attachment 531526 [details] [diff] [review]
Check extensions

Sorry, that probably happened when rebasing a patch in bug 645407.
Attachment #531526 - Flags: review?(bjacob) → review+
http://hg.mozilla.org/mozilla-central/rev/4b0b0441b949
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Depends on: 658921
Assignee: nobody → matt.woodrow+bugzilla
Matt, bjacob, based on checkin date I'm guessing TM should be v7. If that is incorrect, please fix the TM
Keywords: perf
Target Milestone: --- → mozilla7
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.
(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?
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.
(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?
(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.
(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?
Target Milestone: mozilla7 → mozilla6
> Is Target Milestone being used at all for core checkins?

Yes.  At least it should be.
(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?
(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.
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?
(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?
^ Matt, please reply to this!
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.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: