Xorg CPU usage question

Adam Jackson ajax at redhat.com
Tue Oct 6 17:27:45 UTC 2009


On Tue, 2009-10-06 at 08:03 -0700, David L wrote:
> I don't think think this is specific to rawhide, but it seems
> maybe a bit worse in rawhide, so I'm asking on this list.
> I have a gnome terminal running an app that prints a lot
> of lines (perhaps 60 100 character lines per second).
> This causes Xorg to use about 50% of my CPU as
> reported by top, and X responsiveness is really bad.
> 
> I'm running the vesa driver due to this problem:
> https://bugzilla.redhat.com/show_bug.cgi?id=504048
> 
> So maybe not running a driver optimized for my hardware
> is part of the problem.

Yes, it's almost all of the problem in fact.

> But it seems worse than I would expect or than I have
> seen doing similar things on the same hardware in
> older fedora releases.  And the interesting thing is that
> the Xorg CPU usage doesn't change much if I minimize
> the gnome terminal... I would naively expect that X
> would not consume much CPU printing lines to a minimized
> terminal.  And in fact, if I do the same thing in an xterm,
> the Xorg CPU load does go way down when I minimize
> the xterm window.  Why does a gnome terminal make Xorg
> suck more CPU printing to a minimized window than an
> xterm does?

gnome-terminal renders to an offscreen pixmap and then blits from that
to the window.  xterm renders directly to the window.  If the window is
withdrawn, then window rendering is skipped, but pixmap rendering is
never skipped.  Also, gnome-terminal uses antialiased fonts, which
require alpha blending on the edges, which is a bit more CPU intensive
than xterm's aliased fonts.

g-t (vte actually) could reasonably skip rendering to the backing pixmap
if the window is minimized, and I thought it did at one point.

However, X is just an app like any other.  If you have performance
problems, bust out the profiler and figure out where the time is going.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-test-list/attachments/20091006/3ee7d212/attachment.sig>


More information about the fedora-test-list mailing list