Author Topic: [Solved] CPU at 100%  (Read 2144 times)

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
[Solved] CPU at 100%
« on: January 07, 2011, 03:49:02 AM »
I am using an old P4 1.8Mhz machine with 768MB RAM and running PLOS 2010 (Gnome). While everything seems to be running reasonably OK (given the vintage of the machine), I noticed that the CPU is running at 100%. I cleaned the heat sink and the cpu fans prior to installation so it is unlikely caused by dust etc. The problem is running video as the jitter is pretty bad. Verified the CPU usage using htop and got the same numbers.

Any ideas on whether this can be fixed? Or am I trying to do the impossible by running on a P4 system?

Thanks
« Last Edit: January 08, 2011, 08:32:02 PM by gdesilva »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: CPU at 100%
« Reply #1 on: January 07, 2011, 03:51:54 AM »
In a terminal type

top  <enter>

which should show what process are consuming the CPU cycles.
Also check to see if any "zombies" are mentioned - near the top of the output.

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: CPU at 100%
« Reply #2 on: January 07, 2011, 03:56:24 AM »
Thanks for the prompt response Just19.

top does not show anything unusual - 0 zombies. Also, the percentages shown on top does not add up to 100 either - probably would make about 20% right now with firefox running.

EDIT

Just noticed that the zombie count occasionally shows as 1 then reverts back to 0.
« Last Edit: January 07, 2011, 04:03:46 AM by gdesilva »

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: CPU at 100%
« Reply #3 on: January 07, 2011, 04:16:13 AM »
Top tells you the break down of the CPU usage across the top of the page.

So what is telling you that you have 100% CPU usage?

They should probably be compared to see if there are differences in the reports.

Also check in Top if you are using Swap space .....  which may slow down things appreciably.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: CPU at 100%
« Reply #4 on: January 07, 2011, 09:54:57 AM »
"I am using an old P4 1.8Mhz machine with 768MB RAM and running PLOS 2010 (Gnome). While everything seems to be running reasonably OK (given the vintage of the machine)"

that machine is almost the same as mine and i use kde4, twice the load of gnome(supposedly)

please give us more info about video card in use and if you are using compiz fusion

please post top results when you see the system slowdown to verify numbers

the 100% you mention if only happens when watching youtube(flash) videos is sadly normal in linux, be sure to disable hardware acceleration in flash

if the video problem happens on other video programs this is video card/driver related so please post the video driver in use
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: CPU at 100%
« Reply #5 on: January 08, 2011, 01:57:25 AM »
Hi, here it the output of top (when the machine is in idle state!).....

top - 19:45:21 up 1 min,  2 users,  load average: 0.00, 0.00, 0.00
Tasks: 122 total,   2 running, 120 sleeping,   0 stopped,   0 zombie
Cpu(s): 85.8%us, 14.2%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    773040k total,   365124k used,   407916k free,    30888k buffers
Swap:  3470000k total,        0k used,  3470000k free,   153456k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
  881 root       6   0  210m  36m 7364 S  9.3  4.8   0:11.50 X                 
 2024 gdesilva   1   0  9144 4408 2100 S  6.6  0.6   0:03.32 gconfd-2           
 3422 gdesilva   1   0 52216  12m 9692 S  4.3  1.7   0:00.86 gnome-terminal     
 2823 gdesilva   1   0 40428  14m  10m S  3.6  1.9   0:01.89 gnome-panel       
 1929 gdesilva   1   0  4220 1420  620 S  3.0  0.2   0:01.50 dbus-daemon       
 1480 gdesilva   1   0 37488 6392 5296 S  2.0  0.8   0:01.30 gnome-session     
 2962 gdesilva   1   0 27560  16m 4604 S  1.3  2.2   0:03.29 compiz             
 2146 gdesilva   1   0 33012 9.8m 8244 S  1.0  1.3   0:02.64 gnome-settings-   
 2825 gdesilva   1   0 82236  18m  13m S  0.7  2.5   0:02.10 nautilus           
 2845 gdesilva   1   0 29856 7336 6168 S  0.7  0.9   0:00.39 gnome-power-man   
 3609 gdesilva   7   0  2624  960  740 R  0.7  0.1   0:00.11 top               
  649 root       1   0  106m  808  608 S  0.3  0.1   0:00.08 nscd               
  949 root       1   0  3820 1028  880 S  0.3  0.1   0:00.03 hald-addon-stor   
 1474 gdesilva   1   0 23776 3032 2668 S  0.3  0.4   0:00.15 gnome-keyring-d   
 2223 gdesilva   1   0  7372 1916 1664 S  0.3  0.2   0:00.13 gvfsd             
 2869 gdesilva   1   0 28992 2428 1332 S  0.3  0.3   0:00.17 gnome-screensav   
 2914 gdesilva   1   0 44096  12m  10m S  0.3  1.6   0:00.41 clock-applet 



However, as suggested  by T6, I checked the graphics card settings and found that the 3D acceleration was set. I unchecked it, saved and rebooted and found that cpu utilization dropped down to around 23%. However, this broke compiz - i.e. although the compiz manager was running it appeared the system had gone back to metacity and no compiz effects were working.

When I reboot I noted that if compiz was working the 3D acceleration gets checked again. Also, another strange problem is that although I set the resolution to 1280x1024 when I reboot and check the graphic settings it shows it as 1024x768! However, monitor settings claim that it is at 1280x1024.

The card I am using is ATI Radeon 9200 64MB. xorg.conf shows that the driver used is the ati driver.

Thanks for checking this out for me.

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: CPU at 100%
« Reply #6 on: January 08, 2011, 09:54:12 AM »
"However, as suggested  by T6, I checked the graphics card settings and found that the 3D acceleration was set. I unchecked it, saved and rebooted and found that cpu utilization dropped down to around 23%. However, this broke compiz"

if you are in gnome, 3D is compiz so disabel it is remove all effects

"although the compiz manager was running it appeared the system had gone back to metacity and no compiz effects were working."

the app is not the service so when you disable the service, the config app doesn't do anything depending how you call it and what window decoration you had selected

"The card I am using is ATI Radeon 9200 64MB. xorg.conf shows that the driver used is the ati driver"

this is impossible, ati 9200 doesn't have support form ati, since 2007, you must be using x1950 and earlier driver

your amount of vram is very low, i wouldn't use that video card with compiz on the resolution you mention, too much load, my ati 9200 with 128 is just at the limit in 1152x864

the results of top shows that user is using 85% of cpu, in my case is only 9% or less, also your x is using 9% but mine uses 2%

something with the video card is not working properly
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: CPU at 100%
« Reply #7 on: January 08, 2011, 08:29:40 PM »
Thanks T6. I unloaded compiz and everything looks good now - obviously, I was trying too many fancy stuff ;D

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: [Solved] CPU at 100%
« Reply #8 on: January 08, 2011, 09:02:09 PM »
that is possible

i only enable desktop cube, some basic stuff like wobbly windows and other similar basic and useful actions, the rest or i don't have it installed or is disabled

the things i use and doesn't kill machine is opacity(my most used of all)desktop cube, rotate cube, expo, 3d windows(this one can be disabled and you won't notice unless you want it), fading windows, minimize effects, wobbly windows, window decorations(must have if you want emerald themes, i do!), swift switcher and other that or comes enabled by default or doesn't work for everybody

where most users exceed load with compiz is animations, too much animations or excessive usage of fire animation will kill your machine, also explode plugin, transparencies in cube or in many windows simultaneously will do that too

you can survive without it but gnome basically begs you to use it, well, kde4 too  ;D
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: [Solved] CPU at 100%
« Reply #9 on: January 08, 2011, 10:05:08 PM »
For some reason I don't seem to be able to start compiz at all without running the cpu at 100%. I was also using basic desktop cube etc without any animations and the likes.

Also, I haven't worked out why but my Graphics and Monitor Settings always reverts back to 1024x768 resolution and 3D acceleration etc....

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: [Solved] CPU at 100%
« Reply #10 on: January 09, 2011, 09:14:15 AM »
the video card and driver you use is the problem, verify the driver you should be using, x1950 and earlier in pcc

if you installed a ati/amd driver form repos or from amd that is the problem, this card doesn't have drivers anymore
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: [Solved] CPU at 100%
« Reply #11 on: January 09, 2011, 05:13:54 PM »
Actually, I did not do a manual install of the video driver - the graphic settings already had picked the x1950 and earlier driver but when I checked the xorg.conf file the driver listed there is ati. Any idea why this is so?

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: [Solved] CPU at 100%
« Reply #12 on: January 09, 2011, 05:53:59 PM »
Hi, "ati" or "radeon" means the same for Xorg. It's the free version of the driver for that type of card. Therefore it's what is needed. Compiz : I would not even try.

Revert to 3 D... not sure. Do you have mesa and mesa-demos installed at your machine ?

T6: "ati" is another name for the free "radeon" driver. I have had the same card as he does (this was 9200 SE) and have been able to get direct rendering for it long ago. The drivers that are not available anymore for it are the non free drivers, and opengl-dri.

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: [Solved] CPU at 100%
« Reply #13 on: January 09, 2011, 05:57:28 PM »
this is my xorg file:

# File generated by XFdrake (rev )

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "ServerFlags"
    Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "glx" # 3D layer
    Load "dri" # direct rendering
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Plug'n Play"
    ModelName "SyncMaster"
    HorizSync 30-71
    VertRefresh 50-160
    
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630
    
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_120"  176.01  1152 1240 1368 1584  864 865 868 926  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_100"  143.47  1152 1232 1360 1568  864 865 868 915  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_85"  119.65  1152 1224 1352 1552  864 865 868 907  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_75"  104.99  1152 1224 1352 1552  864 865 868 902  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_60"  81.62  1152 1216 1336 1520  864 865 868 895  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1152x864_50"  66.85  1152 1208 1328 1504  864 865 868 889  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_120"  139.05  1024 1104 1216 1408  768 769 772 823  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_100"  113.31  1024 1096 1208 1392  768 769 772 814  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_85"  94.39  1024 1088 1200 1376  768 769 772 807  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_75"  81.80  1024 1080 1192 1360  768 769 772 802  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_60"  64.11  1024 1080 1184 1344  768 769 772 795  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "1024x768_50"  51.89  1024 1064 1168 1312  768 769 772 791  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_120"  91.20  832 896 984 1136  624 625 628 669  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_100"  74.03  832 888 976 1120  624 625 628 661  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_85"  61.56  832 880 968 1104  624 625 628 656  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_75"  53.20  832 872 960 1088  624 625 628 652  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_60"  41.55  832 864 952 1072  624 625 628 646  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "832x624_50"  33.95  832 856 944 1056  624 625 628 643  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_120"  83.95  800 856 944 1088  600 601 604 643  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_100"  68.18  800 848 936 1072  600 601 604 636  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_85"  56.55  800 840 928 1056  600 601 604 630  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_75"  48.91  800 840 920 1040  600 601 604 627  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_60"  38.22  800 832 912 1024  600 601 604 622  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "800x600_50"  31.15  800 824 904 1008  600 601 604 618  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_120"  52.41  640 680 744 848  480 481 484 515  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_100"  43.16  640 680 744 848  480 481 484 509  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_85"  35.71  640 672 736 832  480 481 484 505  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_75"  30.72  640 664 728 816  480 481 484 502  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_60"  23.86  640 656 720 800  480 481 484 497  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "640x480_50"  19.40  640 648 712 784  480 481 484 495  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_120"  28.98  480 504 552 624  360 361 364 387  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_100"  23.84  480 504 552 624  360 361 364 382  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_85"  19.59  480 496 544 608  360 361 364 379  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_75"  16.74  480 488 536 592  360 361 364 377  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_60"  12.89  480 480 528 576  360 361 364 373  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "480x360_50"  10.39  480 472 520 560  360 361 364 371  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_120"  12.38  320 328 360 400  240 241 244 258  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_100"  9.79  320 320 352 384  240 241 244 255  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_85"  8.26  320 320 352 384  240 241 244 253  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_75"  6.93  320 312 344 368  240 241 244 251  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_60"  5.26  320 304 336 352  240 241 244 249  -HSync +Vsync
    
    # modeline generated by gtf(1) [handled by XFdrake]
    ModeLine "320x240_50"  4.17  320 304 328 336  240 241 244 248  -HSync +Vsync
EndSection

Section "Device"
    Identifier "device1"
    VendorName "ATI Technologies Inc"
    BoardName "ATI Radeon X1950 and earlier"
    Driver "ati"
    Option "DPMS"
    Option "AGPMode" "4"
    Option "DynamicClocks" "off"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
    
    Subsection "Display"
        Depth 8
        Modes "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
    
    Subsection "Display"
        Depth 15
        Modes "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
    
    Subsection "Display"
        Depth 16
        Modes "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
    
    Subsection "Display"
        Depth 24
        Modes "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    Screen "screen1"
EndSection

are you sure you have that video card you mention you have?

open konsole and write this command

lspci -v
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline gdesilva

  • Jr. Member
  • **
  • Posts: 27
Re: [Solved] CPU at 100%
« Reply #14 on: January 09, 2011, 07:17:57 PM »
@melodie - I uninstalled mesa and mesa-demos along with compiz and unchecked 3D, rebooted and went back in pcc to find that 3D is being checked again! I think I can live without compiz on this machine anyway and removing compiz did fix the cpu problem.

@T6 - Here is my xorg.conf

# File generated by XFdrake (rev )

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "ServerFlags"
    Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
EndSection

Section "Module"
    Load "dbe" # Double-Buffering Extension
    Load "v4l" # Video for Linux
    Load "extmod"
    Load "glx" # 3D layer
    Load "dri" # direct rendering
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Generic"
    ModelName "1024x768 @ 60 Hz"
    HorizSync 31.5-48.0
    VertRefresh 50.0-70.0
   
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630
   
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection

Section "Device"
    Identifier "device1"
    VendorName "ATI Technologies Inc"
    BoardName "ATI Radeon X1950 and earlier"
    Driver "ati"
    Option "DPMS"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
   
    Subsection "Display"
        Depth 8
        Modes "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 15
        Modes "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 16
        Modes "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 24
        Modes "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    Screen "screen1"
EndSection

For some reason it does not detect details of my screen (Dell 1800FP) and hence the lists as generic.

Here is the output of lspci

01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01) (prog-if 00 [VGA controller])
   Subsystem: C.P. Technology Co. Ltd CN-AG92E
   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16
   Memory at e0000000 (32-bit, prefetchable) [size=256M]
   I/O ports at ec00 [size=256]
   Memory at ff8f0000 (32-bit, non-prefetchable) [size=64K]
   Expansion ROM at ff800000 [disabled] [size=128K]
   Capabilities: <access denied>
   Kernel modules: radeonfb


One of the drawbacks of the current settings despite keeping the cpu rate low, is that it is practically impossible to run flash movies full screen - video jitter is high.