Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > What can cause high cpu usage in java?

Reply
Thread Tools

What can cause high cpu usage in java?

 
 
mk
Guest
Posts: n/a
 
      07-25-2003
Hi,

what can cause a high cpu usage on a linux server with tomcat and
jdk1.4.1_02?
Our webapplication is unused and the logs of the garbage collector
tell us, that
even the garbage collector seems to be bored; i.e. it works about
every 300 sec.

Nonetheless we have a couple of low prioritized java processes which
share almost the whole cpu (about 90%).

What is java doing when even the garbage collector seems to have
nothing to do?
What can be logged from the VM besides the garbage collector
activities to
gain more information?

Help is urgent, since the system can only be relieved through a tomcat
restart.

Thanks,

Markus
 
Reply With Quote
 
 
 
 
Robert Olofsson
Guest
Posts: n/a
 
      07-25-2003
Roger Irwin () wrote:
: mk wrote:
: > Hi,
: >
: > what can cause a high cpu usage on a linux server with tomcat and
: > jdk1.4.1_02?

: Java (and any other language), will continue to use the CPU if you put
: it in a loop, which frequently happens when polling is used to wait for
: a condition. example:

: while(1){
: if(PollTest==1)break;
: }

And if you have context reloading on tomcat will run a loop quite often.
Try turning it off, it should only be used for development.

/robo

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could this unclosed() byteArrayInputStream cause high Heap usage ? Krist Java 6 02-07-2010 09:18 AM
7206 VXR high CPU usage KHANS Cisco 10 02-06-2009 01:49 AM
What would cause this problem? CPU usage 100% John Smith C Programming 5 07-16-2005 05:00 AM
cisco 3620 + HDVt1 high cpu usage optimus Cisco 0 03-03-2004 03:08 AM
router cpu usage abnormally high Bill F Cisco 4 12-01-2003 05:53 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57