CPU load 100% but I can not find the offending process

Asked by Jimmy Volatile

Hi.

I have a newly upgraded Ubuntu 9.10 and I've followed the instructions about disabling the tracker here: http://www.ubuntu.com/getubuntu/releasenotes/904#Tracker%20index%20corruption

The CPU load is constantly at 100% and the fan is running at maximum speed, non-stop, even after a cold restart with nothing else running.

* However, when I fire up the System Monitor --> Processes, showing all processes and sort by % CPU, there is only a few processes running. Their individual % CPU only adds up to 20-30% (with the System Monitor itself staying at 10-15% constantly)

* I've tried the same thing using htop just in case there is something wrong with the System Monitor but with the same result.

* Running the same computer from my Fedora 10 memory stick does not give the same problems at all. CPU load stays at 30-40% at the most.

Is there a way to find out more about what's running on my system and how to kill it? Is there a way to troubleshoot this further. Should I try a different kernel at startup?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
jetbundle
Solved:
Last query:
Last reply:
Revision history for this message
jetbundle (mbrane) said :
#1

Did you check it in "top"? Top also tells you the amount of cpu used e.g. for write access to the HD. A sample output looks like this:

thias@neuron:/etc/apt$ top
top - 06:19:25 up 4 days, 11:05, 3 users, load average: 0.13, 0.20, 0.28
Tasks: 198 total, 2 running, 196 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.8%us, 1.5%sy, 0.0%ni, 93.7%id, 0.0%wa, 1.8%hi, 0.2%si, 0.0%st
Mem: 3984312k total, 3712668k used, 271644k free, 44k buffers
Swap: 8000360k total, 1128640k used, 6871720k free, 980672k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 6229 root 20 0 950m 502m 19m S 4 12.9 226:36.26 Xorg
 6678 thias 20 0 338m 43m 15m S 1 1.1 2:20.10 konsole
15611 thias 20 0 319m 185m 9832 S 1 4.8 28:17.62 knetworkmanager
(and then a big list of more processes)

If you look at the line CPU, then everything should add up to 100%. E.g. if you are copying a big file, you may have e.g. 50%wa (write access) and your system manager might display you more than 50% usage even if the processes you see add up to much less.

Revision history for this message
Rached ALAYA (rached.alaya) said :
#2

Hi Jimmy
I assume ,that you understand Frensh, so I will suggest you to look at this article : http://www.tux-planet.fr/5-astuces-pour-optimiser-ubuntu/
I hope that will solve your problem.
And as jetbundle suggest : could you past us the result of the top command
Thanks, RachedTN

Revision history for this message
Jimmy Volatile (spam-useful) said :
#3

@jetbundle Thanks: Here's my paste from 'top'. The % CPU column adds up to 60-70% across 5 attempts. I do not know how to use to to ensure that I'm viewing all running processes but this is from a cold start and I'm the only one logged in.

top - 13:26:03 up 1:13, 3 users, load average: 3.59, 3.89, 3.76
Tasks: 114 total, 4 running, 110 sleeping, 0 stopped, 0 zombie
Cpu(s): 57.8%us, 40.9%sy, 1.3%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1553088k total, 842936k used, 710152k free, 32648k buffers
Swap: 0k total, 0k used, 0k free, 399624k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 4917 root 20 0 89060 52m 11m R 28.0 3.5 2:44.25 Xorg
 7868 jarl 20 0 38800 20m 14m S 14.6 1.4 0:34.50 gnome-system-mo
 8822 jarl 20 0 345m 176m 29m S 9.3 11.7 0:55.79 firefox
 5522 jarl 20 0 21784 10m 7868 S 3.3 0.7 0:18.50 tracker-applet
 5433 jarl 20 0 3276 1740 864 S 2.3 0.1 1:24.65 dbus-daemon
 5372 jarl 20 0 26920 7540 5704 S 2.0 0.5 1:13.88 x-session-manag
  785 jarl 20 0 2472 1268 1000 S 1.3 0.1 0:05.14 htop
 5441 jarl 20 0 8468 5392 2180 S 1.3 0.3 0:52.92 gconfd-2
 5480 jarl 20 0 52136 21m 13m S 1.3 1.4 0:22.06 gnome-panel
 5473 jarl 20 0 30044 9676 6768 S 0.7 0.6 0:21.70 gnome-settings-
 5520 jarl 20 0 23960 8824 6320 S 0.7 0.6 0:05.86 bluetooth-apple
 5533 jarl 20 0 28124 14m 8128 S 0.7 0.9 0:26.50 python
 5535 jarl 20 0 39504 14m 9660 S 0.7 1.0 0:07.42 gnome-terminal
 5926 jarl 20 0 32928 13m 9.8m S 0.7 0.9 0:09.52 fast-user-switc
 6082 jarl 20 0 16944 5488 4168 S 0.7 0.4 0:13.36 gnome-screensav
12054 jarl 20 0 2448 1172 912 R 0.7 0.1 0:00.06 top
13278 jarl 20 0 22852 7572 6076 R 0.7 0.5 0:00.02 vino-server
    1 root 20 0 3084 1888 564 S 0.0 0.1 0:01.24 init
    2 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/0
    4 root 15 -5 0 0 0 S 0.0 0.0 0:00.50 ksoftirqd/0
    5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
    6 root 15 -5 0 0 0 S 0.0 0.0 0:00.08 events/0
    7 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 khelper

@Rached ALEYA: Thanks but I don't understand French. I'll still try the commands you suggested in a while, though. :)

Revision history for this message
Rached ALAYA (rached.alaya) said :
#4

From what I see, there is nothing wrong !
I recommend that you translate the article that I mentioned : in fact this article gives 5 amzing trics to make jaunty more quick, may be one of those commands will help you :)

Revision history for this message
Best jetbundle (mbrane) said :
#5

Cpu(s): 57.8%us, 40.9%sy, 1.3%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
that's 100%.

The "missing" cpu is the 40.9%sy, where I think sy = system. My naiive guess would mean that's the linux kernel, which is pretty high. I never have anything that high continuously.

What ballpark is your processor in? Also the 28% xorg looks pretty high to me. Also, can you log in in text mode, i.e. without xorg, and look at top then?

You could just try, experimentally, to kill processes, and see how the system (and xorg) cpu usage changes. One candidate would be the tracker applet, or the gnome system monitor. You can do that in "top" by pressing "k" and then the PID number (in the left column) and then either "enter" for default signal 15 or press 9 and then enter if the process doesn't want to die with 15.

Revision history for this message
Jimmy Volatile (spam-useful) said :
#6

Ok. Thanks, guys. I'll try out your suggestions tonight (translate the article and all) and get back to you then.

I'll try my Fedora USB and see what the "sy"-value is there. I'll also boot from a live 9.10 Ubuntu to see what happens then, too.

Here's my hardware as seen by lshw:
     *-cpu
          product: Intel(R) Pentium(R) M processor 2.13GHz
          vendor: Intel Corp.
          physical id: 1
          bus info: cpu@0
          version: 6.13.8
          size: 2133MHz
          capacity: 2133MHz
          width: 32 bits

Revision history for this message
Rached ALAYA (rached.alaya) said :
#7

Jimmy Volatile said : I'll also boot from a live 9.10 Ubuntu
You mean ubuntu 9.04 :)

Revision history for this message
jetbundle (mbrane) said :
#8

Just to give you a comparison, I get approx. 2%sy and 2% xorg when I have nothing going on, and just watch "top" (in KDE), on a dual core 2.4GHz centrino 2. So I would have guessed for your system it should be maybe 5% or even less (since my cpu was presumably clocked down when I looked at it), but nowhere near 40%.

Revision history for this message
Jimmy Volatile (spam-useful) said :
#9

Ok. I found it! The vino-server is taking up 25-35% of the system CPU resources (%sy in top). Thing is, it's starting and stopping a new process about every 1-2 seconds and then about every 10 seconds a third "vino-serv <defunct>" starts up, runs for 3-4 secs and then stops again.

I'm guessing the overhead for starting/stopping the processes counts against the %sy and therefore the offending processes does not stand out with a particular high CPU-load. Funny...

5637 jarl 20 0 23124 8596 6836 S 0.0 0.6 0:01.83 vino-server
23873 jarl 20 0 0 0 0 Z 1.3 0.0 0:00.04 vino-serv <defunct>
23874 jarl 20 0 22716 6708 5280 R 0.7 0.4 0:00.02 vino-server

I'll just file a bug against the vino-server package since the PID keeps incrementing every 1-2 seconds.

Anyway: Thanks for your help and swift response :D

(Looks like I'm not alone having trouble with this:
http://ubuntuforums.org/showthread.php?t=1125401&highlight=cpu+100%25&page=3 )

Revision history for this message
Jimmy Volatile (spam-useful) said :
#10

Thanks jetbundle, that solved my question.