Xorg CPU usage question

David L idht4n at gmail.com
Tue Oct 6 15:03:14 UTC 2009


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.

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?

Thanks,

           David


PS - Here's a little test app that demonstrates the problem
on my system:

#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[])
{
  struct timespec ts;
  ts.tv_sec = 0;
  ts.tv_nsec = 1e9/60;

  while (1) {
    nanosleep(&ts, NULL);
    printf("  1234    14327.8 xyzabc     blah    3    0.00000000
0.00000000   0.00   0.00  0.00    0.00  0.00\n");
  }

}




More information about the fedora-test-list mailing list