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

Reported by Daniel van Vugt on 2012-10-10
86
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Nux
High
Daniel van Vugt
2.0
Medium
Daniel van Vugt
3.0
High
Daniel van Vugt
Unity
High
Daniel van Vugt
nux (Ubuntu)
High
Unassigned
Quantal
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

lp:~vanvugt/nux/fix-1064834
Merged into lp:nux at revision 686
Andrea Azzarone: Approve on 2012-10-10
jenkins: Pending (continuous-integration) requested 2012-10-10
lp:~vanvugt/nux/fix-1064834-3.0
Merged into lp:nux/3.0 at revision 664
Jay Taoko: Approve on 2012-10-12
Timo Jyrinki: Approve on 2012-10-11

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
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
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.

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
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:nux at revision 686

Changed in nux (Ubuntu):
importance: Undecided → High
status: New → Triaged
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

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
Felix Möller (felix-derklecks) wrote :

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

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
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.

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

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

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.

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.

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.

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
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.

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.

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
Timo Jyrinki (timo-jyrinki) wrote :

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

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers