100% CPU usage

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

100% CPU usage

Postby Chuck_N on Sun Jan 13, 2013 11:30 pm

I have an old Dell latitude. 680K RAM. Windows had grown terribly weary so I took a Linux Mint disk and installed it on the whole drive. Interesting getting into this environment; all new to me.
I've noticed recently that response time is bad. I just returned after being away from the machine 1/2 hour to find the HDD light on solid. I called up Task Manager and it showed 100% CPU even though the tasks listed only totaled about 20%.
(I have the list sorted by task % so I can easily see the total, and the names of tasks running.)
Why would my CPU be totally busy? I thought only Windows computers did this. :lol: .
Also, I periodically get an Unresponsive Script warning.
Really sounds like SPYware going to work on me. I've been told not to worry about viruses or spyware in Linux, though.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Linux Mint is funded by ads and donations.
 

Re: 100% CPU usage

Postby Orbmiser on Sun Jan 13, 2013 11:48 pm

Nope not spyware more likely don't have the proper video driver for it. Causing 3d rendering to be emulated in software and maxing out the CPU in the process. Also 680K RAM is not sufficient for Linux Mint 14. Which you didn't specify version used.

Due also low ram causes the OS to write and read a lot more from the swap file on the hardrive.

So give more specs of machine CPU,Video chipset used and ram shows that a lighter distro may be needed. Like Mint xfce version or others that members here may suggest.
User avatar
Orbmiser
Level 7
Level 7
 
Posts: 1514
Joined: Thu Oct 18, 2012 5:16 pm
Location: Portland,Oregon

Re: 100% CPU usage

Postby zerozero on Sun Jan 13, 2013 11:49 pm

Chuck
welcome to the forum :D
can you please share the following terminal output
Code: Select all
inxi -F


in the meantime you can check more accurately your system either with
Code: Select all
top
just type that on the terminal

or with
Code: Select all
htop
(has a more friendly presentation than the first one but you have to install it first)
Code: Select all
apt install htop
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6482
Joined: Tue Jul 07, 2009 2:29 pm

Re: 100% CPU usage

Postby Chuck_N on Sun Jan 13, 2013 11:59 pm

zerozero wrote:Chuck
welcome to the forum :D
can you please share the following terminal output
Code: Select all
inxi -F


in the meantime you can check more accurately your system either with
Code: Select all
top
just type that on the terminal

or with
Code: Select all
htop
(has a more friendly presentation than the first one but you have to install it first)
Code: Select all
apt install htop


okay, here is the inxi:

Code: Select all
chuck@chuck-Latitude-C640 ~ $ inxi -F
System:    Host chuck-Latitude-C640 Kernel 3.0.0-12-generic i686 (32 bit)
           Desktop LXDE (Openbox 3.5.0) Distro Linux Mint 12 LXDE
Machine:   System Dell (portable) product Latitude C640
           Mobo Dell model N/A Bios Dell version A10 date 01/12/2004
CPU:       Single core Mobile Intel Pentium 4 - M CPU (-UP-) cache 512 KB flags (sse sse2) clocked at 1200.00 MHz
Graphics:  Card: ATI Radeon Mobility M7 LW [Radeon Mobility 7500]
           X.Org 1.10.4 drivers ati,radeon unloaded: fbdev,vesa Resolution 1400x1050@60.2hz
           GLX Renderer Mesa DRI R100 (RV200 4C57) x86/MMX/SSE2 TCL DRI2 GLX Version 1.3 Mesa 7.11
Audio:     Card Intel 82801CA/CAM AC'97 Audio Controller driver Intel ICH Sound: ALSA v: 1.0.24
Network:   Card 3Com 3c905C-TX/TX-M [Tornado] driver 3c59x
           IF: eth0 state: unknown speed: 100 Mbps duplex: full mac: 00:0b:db:a4:c9:8a
Drives:    HDD Total Size: 30.0GB (9.5% used) 1: /dev/sda IC25N030ATMR04 30.0GB
Partition: ID:/ size: 27G used: 2.7G (11%) fs: ext4 ID:swap-1 size: 0.67GB used: 0.17GB (25%) fs: swap
Sensors:   Error: You do not have the sensors app installed.
Info:      Processes 120 Uptime 5:14 Memory 464.4/622.5MB Client Shell inxi 1.7.7
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 12:35 am

I got this from htop:

Code: Select all
top - 22:48:03 up  6:02,  0 users,  load average: 1.58, 1.20, 1.01
Tasks: 117 total,   3 running, 113 sleeping,   0 stopped,   1 zombie
Cpu(s): 46.3%us, 11.4%sy,  0.0%ni, 18.8%id, 22.8%wa,  0.0%hi,  0.7%si,  0.0%st
Mem:    637420k total,   585664k used,    51756k free,      524k buffers
Swap:   653308k total,   235048k used,   418260k free,    33672k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                       
 1158 root      20   0 77452  28m 1960 S 24.3  4.6  25:58.97 Xorg                                                                                                           
 1775 chuck     20   0 1100m 419m  10m S 18.2 67.3  65:31.45 firefox                                                                                                       
 2147 chuck     20   0  108m 4088 2812 R  6.3  0.6  21:26.64 lxtask                                                                                                         
 2428 chuck     20   0  118m 5684 3496 S  4.6  0.9   0:05.45 x-terminal-emul                                                                                               
 1848 chuck     20   0  220m  11m 3736 R  4.4  1.8   9:05.64 plugin-containe                                                                                               
   20 root      20   0     0    0    0 S  1.2  0.0   0:30.49 kswapd0                                                                                                       
 1516 chuck     20   0  8884  884  640 S  0.2  0.1   0:06.04 gconfd-2                                                                                                       
 3254 chuck     20   0  2820  936  652 R  0.2  0.1   0:00.41 top                                                                                                           
    1 root      20   0  3320  312  312 S  0.0  0.0   0:01.20 init                                                                                                           
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                                                                                                       
    3 root      20   0     0    0    0 S  0.0  0.0   0:02.28 ksoftirqd/0                                                                                                   
    5 root      20   0     0    0    0 S  0.0  0.0   0:00.60 kworker/u:0                                                                                                   
    6 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                                                                                   
    7 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 cpuset                                                                                                         
    8 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 khelper                                                                                                       
    9 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 netns                                                                                                         
   10 root      20   0     0    0    0 S  0.0  0.0   0:00.09 sync_supers                                                                                                   
   11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 bdi-default                                                                                                   
   12 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kintegrityd                                                                                                   
   13 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kblockd                                                                                                       
   14 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 ata_sff                                                                                                       
   15 root      20   0     0    0    0 S  0.0  0.0   0:00.03 khubd                                                                                                         
   16 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 md                                                                                                             
   19 root      20   0     0    0    0 S  0.0  0.0   0:00.01 khungtaskd                                                                                                     
   21 root      25   5     0    0    0 S  0.0  0.0   0:00.00 ksmd                                                                                                           
   22 root      39  19     0    0    0 S  0.0  0.0   0:00.00 khugepaged                                                                                                     
   23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 fsnotify_mark                                                                                                 
   24 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ecryptfs-kthrea                                                                                               
   25 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 crypto                                                                                                         
   33 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kthrotld                                                                                                       
   34 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/u:2                                                                                                   
   37 root      20   0     0    0    0 S  0.0  0.0   0:00.02 scsi_eh_0                                                                                                     
   38 root      20   0     0    0    0 S  0.0  0.0   0:03.24 scsi_eh_1                                                                                                     
  233 root      20   0     0    0    0 S  0.0  0.0   0:00.82 jbd2/sda1-8                                                                                                   
  234 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 ext4-dio-unwrit                                                                                               
  289 root      20   0  2648  196  196 S  0.0  0.0   0:00.25 upstart-udev-br                                                                                               
  294 root      20   0  3092  200  200 S  0.0  0.0   0:00.19 udevd                                                                                                         
  439 syslog    20   0 27908  148  148 S  0.0  0.0   0:03.85 rsyslogd                                                                                                       
  455 messageb  20   0  4176  964  588 S  0.0  0.2   0:01.63 dbus-daemon                                                                                                   
  479 root      20   0  6864  564  564 S  0.0  0.1   0:00.25 modem-manager                                                                                                 
  482 avahi     20   0  3316  264  200 S  0.0  0.0   0:00.08 avahi-daemon                                                                                                   
  483 avahi     20   0  3316   48   48 S  0.0  0.0   0:00.00 avahi-daemon                                                                                                   
  585 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                                                                                                     
  619 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pccardd                                                                                                       
  626 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 ttm_swap                                                                                                       
  660 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pccardd                                                                                                       
  706 root      20   0  3088  164  164 S  0.0  0.0   0:00.00 udevd                                                                                                         
  714 root      20   0  3088  156  156 S  0.0  0.0   0:00.00 udevd                                                                                                         
  718 root      20   0 26728 1040  744 S  0.0  0.2   0:00.37 NetworkManager                                                                                                 
  722 root      20   0 23440  632  632 S  0.0  0.1   0:00.35 polkitd                                                                                                       
  754 root      20   0 18192  476  356 S  0.0  0.1   0:00.26 smbd
Last edited by Chuck_N on Mon Jan 14, 2013 12:48 am, edited 1 time in total.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 12:39 am

Orbmiser wrote:Nope not spyware more likely don't have the proper video driver for it. Causing 3d rendering to be emulated in software and maxing out the CPU in the process. Also 680K RAM is not sufficient for Linux Mint 14. Which you didn't specify version used.

Due also low ram causes the OS to write and read a lot more from the swap file on the hardrive.

So give more specs of machine CPU,Video chipset used and ram shows that a lighter distro may be needed. Like Mint xfce version or others that members here may suggest.



Using Linux Mint 12 LXDE
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby TheDynamicHamza21 on Mon Jan 14, 2013 12:45 am

use the top command in terminal to see what's eating up your cpu.

http://www.youtube.com/watch?v=ZfQnjtyXTX4#t=00m10s
http://www.youtube.com/watch?v=KAxgDncrUlo
Linux Registered User: # 573034

www.domeshotsandfatlaces.com
User avatar
TheDynamicHamza21
Level 5
Level 5
 
Posts: 780
Joined: Thu Oct 04, 2012 7:24 pm
Location: California

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 1:23 am

seems to me the problem with using TOP or Task Manager for viewing what's happening when the processor is being hogged down 100%
is that you can't get to them, or run them, when the processor is being hogged down 100%.

CATCH-22, if you recall that movie.......
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby bjornmu on Mon Jan 14, 2013 2:19 am

No, top should also get some CPU time even if other processes already use 100%. Looks like your firefox is very busy, and also making the X server (Xorg) busy. It's also grown rather huge. It's already used a few days of CPU, my first instinct would be to restart it.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 156
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 3:06 pm

your first instinct would be to "restart it". Restart what?


Here's my observation: if I click on a link, usually it will take about 10 minutes of solid HDD time, in which time I can do nothing.
Then the light will sputter a bit, and quit.
Then I usually get a Script error message, or two.
This morning I got these two, after such delays:
Stop Script or Continue?
https//fbstatic.a-akamaihd.net/rsrc.php/vz/y2/r/v5ststrDzxK.js:29
and chrome/browser/content URLbarbindings.xml:181
I'm not even USING Chrome, just FFox

just had the identical problem right in the middle of typing this message; first the long pause, then both of the script error messages.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 4:18 pm

okay it looks like those scripts are the culprits. They come up each time I get this extended HDD action.

I now rebooted from the original Linux Mint disk. I've gone repeatedly from Facebook to Yahoo mail to GOOGLE search and I have NO TROUBLE. Except of course it's a bit slow compared to a good installation.

So, what are these two Scripts about? Are they like malware, that I shouldn't have them? Or are they necessities that are somehow corrupted?

I could reinstall from CD since I have not done much since installation.

But how do I avoid , or fix this in the future?
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby bjornmu on Mon Jan 14, 2013 4:41 pm

When I said "restart it" I meant firefox. It had grown to above the size of your memory so parts of the memory was being swapped to disk, and when it needs that memory for something it would start swapping. With my previous desktop this could happen if I opened a page with too many or too large images; the disk would start churning like mad and everything would freeze for several minutes :? . It's a good idea to restart firefox if you're running low on free memory, it tends to keep growing.

As for those scripts, not to worry. When your system starts thrashing (as it's called), thinks take too long and firefox thinks it's hanging.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 156
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 5:16 pm

bjornmu wrote:When I said "restart it" I meant firefox. It had grown to above the size of your memory so parts of the memory was being swapped to disk, and when it needs that memory for something it would start swapping. With my previous desktop this could happen if I opened a page with too many or too large images; the disk would start churning like mad and everything would freeze for several minutes :? . It's a good idea to restart firefox if you're running low on free memory, it tends to keep growing.
As for those scripts, not to worry. When your system starts thrashing (as it's called), thinks take too long and firefox thinks it's hanging.



I tend to disagree here, mainly because I start up fresh in the morning and get into Ymail and, like this morning, immediately get these problems. No way to be less overloaded by restarting again...... But yes, I am now running from CD and have a Youtube video playing without fault, a Ymail tab, a Facebook tab, a GOOGLE tab, and sometimes many more windows open, and everything is going fine; I think Firefox is doing an incredible job.

I do sometimes notice that it's time to close a few tabs when they're just sitting there wasting memory, but that's no big deal. The super-long pauses and diskthrashing and Script Messages, those are a big deal.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby bjornmu on Mon Jan 14, 2013 5:37 pm

Well, your top output says firefox had grown to 1100 megs virtual memory size, I don't know how that's even possible since it's more than physical memory + used swap, but anyway it's quite significant. It's also using 67% of your available physical memory so I'd say it looks pretty guilty. :)
User avatar
bjornmu
Level 3
Level 3
 
Posts: 156
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 5:52 pm

bjornmu wrote:Well, your top output says firefox had grown to 1100 megs virtual memory size, I don't know how that's even possible since it's more than physical memory + used swap, but anyway it's quite significant. It's also using 67% of your available physical memory so I'd say it looks pretty guilty. :)


As I said, FFox is incredible. I'll reboot into my installed Mint start FFOX , open only Ymail, and do another TOP. That should confirm the "small" size of FFox.

But my main problem still exists: disk thrashing and error script messages.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby bjornmu on Mon Jan 14, 2013 6:00 pm

I'd still say firefox was the likely culprit, never mind I said it had used days of CPU, I misread minutes as hours. You should run top after you've seen the problem.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 156
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 6:41 pm

TOP from fresh boot and startup FFOX with one tab for Ymail

top - 16:43:39 up 40 min, 0 users, load average: 0.05, 0.06, 0.09
Tasks: 109 total, 1 running, 107 sleeping, 0 stopped, 1 zombie
Cpu(s): 4.0%us, 4.6%sy, 0.0%ni, 91.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 637420k total, 573380k used, 64040k free, 15760k buffers
Swap: 653308k total, 2000k used, 651308k free, 277188k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1134 root 20 0 51336 30m 7484 S 6.0 4.9 0:59.93 Xorg
1678 chuck 20 0 118m 12m 9660 S 5.6 2.0 0:11.89 x-terminal-emul
1625 chuck 20 0 472m 153m 29m S 3.0 24.7 4:21.30 firefox
1670 chuck 20 0 115m 29m 16m S 2.3 4.7 1:00.61 plugin-containe
1732 chuck 20 0 2812 1124 856 R 0.7 0.2 0:10.80 top
1 root 20 0 3328 1820 1232 S 0.0 0.3 0:01.18 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.13 ksoftirqd/0
5 root 20 0 0 0 0 S 0.0 0.0 0:00.60 kworker/u:0
6 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
7 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cpuset
8 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 sync_supers
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 bdi-default
12 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
14 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
15 root 20 0 0 0 0 S 0.0 0.0 0:00.04 khubd
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
19 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby bjornmu on Mon Jan 14, 2013 6:52 pm

Already 472m virtual memory and 4 minutes of CPU does look a bit excessive, could it be something on Ymail which causes it to run out of control? You may want to keep and eye and see if it just keeps growing and growing.
User avatar
bjornmu
Level 3
Level 3
 
Posts: 156
Joined: Wed Dec 19, 2012 2:50 am
Location: Trondheim, Norway

Re: 100% CPU usage

Postby Chuck_N on Mon Jan 14, 2013 7:00 pm

bjornmu wrote:I'd still say firefox was the likely culprit, never mind I said it had used days of CPU, I misread minutes as hours. You should run top after you've seen the problem.


okay, I'll run TOP after I've seen the problem; that shouldn't take long

WRONG. I opened Fbook, Ymail, Youtube video, and a couple more tabs and no thrashing yet.

Thanks for fixing it !!!! Just kidding.

I have duties to do. I'll TOP next time I get back to this and get some thrashing going on.
If you don't have time to do it right,
where will you find time to do it over?
Chuck_N
Level 1
Level 1
 
Posts: 25
Joined: Tue Jan 08, 2013 7:01 pm

Re: 100% CPU usage

Postby zerozero on Mon Jan 14, 2013 7:45 pm

if FF in live-session was ok and is misbehaving in the installed system there's something wrong either on the profile or with some(s) addons
start FF in safe mode (first quit all instances of FF) then in the terminal
Code: Select all
firefox -safe-mode
if in safe-mode FF is not trashing you'll have to go tho all your installed addons and see which is the problematic.

if this doesn't solve it try creating a new profile
http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Image

[ bliss of ignorance ]
zerozero
Level 16
Level 16
 
Posts: 6482
Joined: Tue Jul 07, 2009 2:29 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Newbie Questions

Who is online

Users browsing this forum: Google Adsense [Bot], tdockery97 and 44 guests