LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   java hogging CPU (both Firefox/Chrome) temps skyrocket (http://www.linuxquestions.org/questions/ubuntu-63/java-hogging-cpu-both-firefox-chrome-temps-skyrocket-811573/)

Ubunoob001 06-01-2010 03:54 PM

java hogging CPU (both Firefox/Chrome) temps skyrocket
 
Hi all, I am new to linux and ubuntu 10.04_64

I am currently running Firefox and Chrome, however I am getting the same problem with both. When opening a site with Java usage, i have terrible CPU hogging and battery usage (battery life goes from 2+ hrs to 30 min max). Also CPU temps go from 49 to 69 deg with fan on constantly

output of top before Java site loading:
Code:

$ top

top - 15:40:36 up 10 min,  2 users,  load average: 1.04, 0.67, 0.33
Tasks: 164 total,  3 running, 161 sleeping,  0 stopped,  0 zombie
Cpu(s):  0.8%us,  1.0%sy,  0.0%ni, 97.5%id,  0.0%wa,  0.3%hi,  0.3%si,  0.0%st
Mem:  3052112k total,  983876k used,  2068236k free,    44744k buffers
Swap:  4022264k total,        0k used,  4022264k free,  427704k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND         
 1171 root      20  0  163m  31m  13m S    1  1.1  0:37.26 Xorg             
    4 root      20  0    0    0    0 S    1  0.0  0:00.21 ksoftirqd/0     
    7 root      20  0    0    0    0 S    0  0.0  0:00.38 ksoftirqd/1     
 1549 administ  20  0  199m  12m 9540 S    0  0.4  0:00.21 notify-osd       
 1763 administ  20  0  525m 103m  29m S    0  3.5  0:20.62 firefox-bin     
 1809 administ  20  0 70944  12m 9156 R    0  0.4  0:01.95 npviewer.bin     
 1831 administ  20  0  293m  17m  12m S    0  0.6  0:01.51 gnome-terminal

and after:
Code:

$ top

top - 15:41:51 up 11 min,  2 users,  load average: 1.10, 0.77, 0.39
Tasks: 165 total,  3 running, 162 sleeping,  0 stopped,  0 zombie
Cpu(s): 54.8%us,  2.6%sy,  0.0%ni, 41.6%id,  0.0%wa,  1.0%hi,  0.0%si,  0.0%st
Mem:  3052112k total,  1304184k used,  1747928k free,    45140k buffers
Swap:  4022264k total,        0k used,  4022264k free,  488432k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND         
 1896 administ  20  0 1286m 267m  18m S  100  9.0  0:44.80 java             
 1171 root      20  0  173m  31m  13m S    6  1.1  0:42.93 Xorg             
 1763 administ  20  0  554m 104m  29m S    3  3.5  0:30.17 firefox-bin     
 1809 administ  20  0 70944  12m 9156 S    2  0.4  0:03.03 npviewer.bin     
 1831 administ  20  0  309m  17m  12m S    2  0.6  0:02.55 gnome-terminal   
 1423 administ  20  0  319m  34m 8612 S    1  1.1  0:09.78 compiz

any help would be greatly appreciated.

paulsm4 06-01-2010 07:14 PM

Q: Are you sure this particular site just doesn't have a poorly written applet that happens to be a CPU hog? Have you tried other applets on other sites?

Q: Did you try downloading the Sun JRE (and de-installing Gnu Java, if it happens to be the default on your system)?

Ubunoob001 06-01-2010 08:03 PM

Quote:

Originally Posted by paulsm4 (Post 3989381)
Q: Are you sure this particular site just doesn't have a poorly written applet that happens to be a CPU hog? Have you tried other applets on other sites?

Q: Did you try downloading the Sun JRE (and de-installing Gnu Java, if it happens to be the default on your system)?


1. I have noticed it on at least two other sites. Also, it doesn't happen on Win or OSX.
2. No i haven't. Let me try this...

syg00 06-01-2010 09:05 PM

And I always thought chewing up machines was one of the design criteria for Java ...
Write once, debug everywhere.

paulsm4 06-02-2010 01:47 AM

Hi -

This sounds like it might help, too:

http://blog.taragana.com/index.php/a...ox-in-2-steps/

IMHO .. PSM

Ubunoob001 06-05-2010 08:35 PM

Java CPU Ubuntu 10.04_64 SOLVED
 
Quote:

Originally Posted by paulsm4 (Post 3989381)
Q: Did you try downloading the Sun JRE (and de-installing Gnu Java, if it happens to be the default on your system)?

This did infact work. My cpu usage went from 100% to about 4% for Java usage.

I followed the instructions at http://sites.google.com/site/easylinuxtipsproject/java

Thanks for the advice!


All times are GMT -5. The time now is 01:36 AM.