X consuming a lot of CPU

Every now and then I find that Xorg suddenly uses a lot of CPU for a while, making xmonad non-responsive. In general, this seems to be a fault of either Firefox or Emacs (in that xrestop says Firefox is using the most responses but for me it usually becomes unresponsive whilst I'm using Emacs). As of today, xorg has been using at least 60% of my CPU most of the time, making xmonad very non-responsive. I was thinking that the issue was with xmonad, especially when I subsequently booted into KDE and had no problems. However, that seems to not be the case: the problem was my terminal emulator (I realised this when I noticed that the most CPU usage was occurrring whilst looking at the top output in my terminal). I'm normally use Xfce's Terminal [1], and it seems that it seems to be the cause of the problems: when I switched to xterm, my problems all disappeared (and when I was in KDE, I was using Konsole, not Terminal). [1]: http://www.xfce.org/projects/terminal I would be interested in hearing if anyone else has similar problems and uses another vte-based terminal emulator (such as Gnome's terminal); more specifically, if using a different terminal emulator solves their problem. For comparison purposes, I have vte-0.24.1 and Terminal-0.4.5. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Ivan Lazar Miljenovic
I would be interested in hearing if anyone else has similar problems and uses another vte-based terminal emulator (such as Gnome's terminal); more specifically, if using a different terminal emulator solves their problem.
I just remembered that I had lxterminal installed as well; when trying this it doesn't seem to have this problem. I'm not sure if this is specific to xfce's terminal + xmonad or just terminal's fault. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/19/10 08:59 , Ivan Lazar Miljenovic wrote:
Every now and then I find that Xorg suddenly uses a lot of CPU for a while, making xmonad non-responsive. In general, this seems to be a fault of either Firefox or Emacs (in that xrestop says Firefox is using the most responses but for me it usually becomes unresponsive whilst I'm using Emacs).
Emacs and many terminal emulators have this thing where they don't want to obey the window manager and try to resize themselves to their preferred size instead. Could this be it? - -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwc4WwACgkQIn7hlCsL25XxwQCgmBQkZ3rtUGnOjNkThu12+99q oUsAoLckynEjJypnDqV+ifhMpgz3ueSf =7/1z -----END PGP SIGNATURE-----

Brandon S Allbery KF8NH
On 6/19/10 08:59 , Ivan Lazar Miljenovic wrote:
Every now and then I find that Xorg suddenly uses a lot of CPU for a while, making xmonad non-responsive. In general, this seems to be a fault of either Firefox or Emacs (in that xrestop says Firefox is using the most responses but for me it usually becomes unresponsive whilst I'm using Emacs).
Emacs and many terminal emulators have this thing where they don't want to obey the window manager and try to resize themselves to their preferred size instead. Could this be it?
Could be; I've never managed to work out what the problem was. In this case, I've narrowed it down even further: I can run terminal with no problem, but as soon as I run top inside it it starts chewing up CPU (even if I quit top). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Quoting Ivan Lazar Miljenovic
In this case, I've narrowed it down even further: I can run terminal with no problem, but as soon as I run top inside it it starts chewing up CPU (even if I quit top).
Does top use curses? Do other curses apps trigger this behavior? ~d

wagnerdm@seas.upenn.edu writes:
Quoting Ivan Lazar Miljenovic
: In this case, I've narrowed it down even further: I can run terminal with no problem, but as soon as I run top inside it it starts chewing up CPU (even if I quit top).
Does top use curses? Do other curses apps trigger this behavior?
Top does appear to use ncurses, but trying to run things like console emacs or ncdu doesn't result in the same kind of X usage (goes from 7% to 17%). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
participants (3)
-
Brandon S Allbery KF8NH
-
Ivan Lazar Miljenovic
-
wagnerdm@seas.upenn.edu