Compiz spends 94% of its CPU time in glTexImage2D() from nux::IOpenGLSurface::InitializeLevel() from ... nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open

Bug #1064834 reported by Daniel van Vugt
86
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Nux
Fix Released
High
Daniel van Vugt
2.0
Invalid
Medium
Daniel van Vugt
3.0
Fix Released
High
Daniel van Vugt
Unity
Invalid
High
Daniel van Vugt
nux (Ubuntu)
Fix Released
High
Unassigned
Quantal
Fix Released
High
Unassigned

Bug Description

[IMPACT]

On low-end systems, CPU is consumed by compiz, making the active blur slower.

[TESTCASE]

No testcase except for no regressions. On most systems the impact is not very noticeable since drawing of Dash items takes most of the time.

[REGRESSION POTENTIAL]

No known regression potential, tested on variety of drivers.

---

Compiz spends 94% of its CPU time in nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open.

unity::UnityScreen::paintDisplay() [98%]
nux::GraphicsEngine::CreateTextureFromBackBuffer(int, int, int, int) [94%]
nux::GpuDevice::CreateSystemCapableDeviceTexture(int, int, int, nux::BitmapFormat, char const*, int)
nux::GpuDevice::CreateTexture(int, int, int, nux::BitmapFormat, char const*, int)
nux::IOpenGLTexture2D::IOpenGLTexture2D(unsigned int, unsigned int, unsigned int, nux::BitmapFormat, bool, char const*, int)
nux::IOpenGLSurface::InitializeLevel()
?
_Mesa_TexImage2D

Related branches

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Compiz spends 94% of its CPU time in nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open

Full callgrind output

summary: - Compiz spends 98% of its CPU time in
+ Compiz spends 94% of its CPU time in
nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note: I had glxgears running behind the open dash to make it redraw.

Changed in unity:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in unity:
status: Triaged → In Progress
summary: Compiz spends 94% of its CPU time in
- nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open
+ nux::GraphicsEngine::CreateTextureFromBackBuffer ... TexImage2D when the
+ dash is open
Changed in unity:
importance: Medium → High
Changed in nux:
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
milestone: none → 4.0
status: New → In Progress
summary: - Compiz spends 94% of its CPU time in
- nux::GraphicsEngine::CreateTextureFromBackBuffer ... TexImage2D when the
- dash is open
+ Compiz spends 95% of its CPU time in glTexImage2D() from
+ nux::IOpenGLSurface::InitializeLevel() from ...
+ nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open
summary: - Compiz spends 95% of its CPU time in glTexImage2D() from
+ Compiz spends 94% of its CPU time in glTexImage2D() from
nux::IOpenGLSurface::InitializeLevel() from ...
nux::GraphicsEngine::CreateTextureFromBackBuffer when the dash is open
Changed in unity:
status: In Progress → Invalid
milestone: 7.0.0 → none
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Tentatively targeting to 2.0 as well, if this happens to improve the perceived active blur performance in general a lot.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, the fix for this bug affects active blur somewhat, but not sufficiently to say active blur is "fast".

That said, the benefit of this fix will vary between systems. Likely to be quite beneficial for LLVMpipe.

P.S. By my measurements, the blur operation is very fast already. It's just that the dash redraws all the icons and its textures on every frame that makes it slow (still).

description: updated
Changed in nux:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:nux at revision 686

Changed in nux (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Set to medium for 2.0 The offending call to CreateTextureFromBackBuffer was only introduced in Unity 6.x (Nux 3.x). I'm not sure what, if any, benefit there would be to Nux 2.x.

description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Daniel, or anyone else affected,

Accepted nux into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nux/3.10.0-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in nux (Ubuntu Quantal):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Felix Möller (felix-derklecks) wrote :

Thanks alot for this fix. It improves the dash performance on my Thinkpad T400 significantly. Great!!

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm not going to go to the trouble of profiling Unity again to verify this fix.

Felix's comment is enough I think.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Jaroslav (jaroslavj) wrote :

Few minutes after boot my system becomes quite unresponsive and I narrowed it to compiz.

When I toggle the launcher on autohide compiz gets to 40% cpu usage, when Expo(super + s) is triggered over 90%.

Here is my compizcpu.txt

Please reopen this bug.

Revision history for this message
Hugo Venhorst (yougo) wrote :

I Have to agree with Daniels comment at #4. the dash comes up fast enough with active blur, but population of the Dash makes it unusably slow to the point of me losing patience and killing the x session to get unstuck.

i do have the proposed repos active, and nux 3.10.0-0ubuntu1 installed

Revision history for this message
Hugo Venhorst (yougo) wrote :

i just opened the dash, and closed it again. the closing took forever, and the launcher and top bar didn't come back.

a terminal running top, showed compiz racing to 100% cpu and staying there.

here's the thing: when switching to vt2 and back to vt7, unity was suddenly fine, and i saw compiz sinking down to about 10% cpu

is there any info or log file i can submit?

my system:
ACER Aspire 9300
1.7 Gb RAM
CPU: AMD Athlon(tm) 64 X2 Dual-Core Processor TK-53 × 2
graphics: GeForce Go 6100/integrated/SSE2 (running NVIDIA experimental binary)
OS: ubuntu 12.10 64-bit

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is fixed, although most people wouldn't have the fix yet.

Please try Nux 3.10 as described above. If it doesn't solve your problem then please log a NEW bug rather than commenting here.

Revision history for this message
Hugo Venhorst (yougo) wrote :

@daniel, i'm confused. Iirc you redirected people here from bug #814833?

Either this bug isn't fixed or the other bug displays strikingly similar behavior.

Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nux - 3.10.0-0ubuntu1

---------------
nux (3.10.0-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release.
    - Remove a massive bottleneck, where almost all the CPU time was spent
      loading a black image on texture creation. (LP: #1064834)
 -- Timo Jyrinki <email address hidden> Fri, 12 Oct 2012 15:24:59 +0300

Changed in nux (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hugo,

If bug 814833 was the same as this then I would have marked it as a duplicated. This bug is particularly about a regression seen in the initial release of 12.10 compared to 12.04. However the other bug is much older so has a different cause.

Revision history for this message
Lem (lem-jjr) wrote :

I'm not sure if this is the right place to post about it, but the nvidia-experimental-310 driver (packaged by Alberto Milone, heading for quantal-proposed but not there yet it seems) fixes the poor dash performance with glxgears running behind it. I tested with nux 3.10 first, didn't fix it, but after the 310 driver, seems to work ok. This is with a GTX560Ti.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nux - 3.10.0-0ubuntu1

---------------
nux (3.10.0-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release.
    - Remove a massive bottleneck, where almost all the CPU time was spent
      loading a black image on texture creation. (LP: #1064834)
 -- Timo Jyrinki <email address hidden> Fri, 12 Oct 2012 15:24:59 +0300

Changed in nux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

As per comment #6 removing from 12.04 agenda since this wouldn't probably help much there.

Revision history for this message
Stephen M. Webb (bregma) wrote :

Fix Released in Nux Nux 4.0.0.

Changed in nux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.