I have noticed that java processes on my RedHat 5.2 box are constantly using
CPU time even when they are idle. This is much more than just garbage
collection -- they are constantly using CPU time, even when left idle for
days.
Here is the output of "top" with the topmost processes listed.
5:34pm up 7 days, 16:56, 8 users, load average: 0.16, 0.10, 0.09
74 processes: 71 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 11.0% user, 0.9% system, 0.0% nice, 88.2% idle
Mem: 515596K av, 507100K used, 8496K free, 93484K shrd, 359572K buff
Swap: 128484K av, 0K used, 128484K free 54472K cached
PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
6215 s001v002 11 0 11540 11M 1024 R 0 3.2 2.2 223:37 java
6794 s001v003 8 0 11520 11M 1024 R 0 1.7 2.2 212:14 java
4657 s001v001 5 0 5740 5740 1024 S 0 1.5 1.1 240:15 java
10557 root 4 0 724 724 552 R 0 1.1 0.1 0:13 top
8613 root 10 0 1656 1656 1240 R 0 0.1 0.3 0:03 xterm
1 root 0 0 404 404 336 S 0 0.0 0.0 0:02 init
2 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd
3 root -12 -12 0 0 0 SW< 0 0.0 0.0 0:00 kswapd
4 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 md_thread
5 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 md_thread
I am using the Blackdown JDK1.1.7v1a on a dual Pentium II 350MHz system with
512MB RAM running RedHat 5.2.
I noticed the same type of problem on Solaris using Sun's JDK1.1.6 a few
months ago. When I discovered Sun's "Production JDK" for Solaris and tried
it out, the CPU utilization disappeared. It ran MUCH better.
I have a feeling that the standard Sun JDK may have some problems that Sun
has fixed in their Production JDK (http://sun.com/solaris/java/). I'm
assuming the Blackdown JDK may have similar problems.
Does anyone know what might be causing this? Will it be fixed in a future
release? Should I just wait for Sun's JDK 1.2 for Linux?
BTW... The three java processes listed above are separate instances of the
JRun servlet runner connected to an Apache web server. This is exactly the
same thing that I was running on the Solaris box before and after I switched
to the Production JDK 1.1.6.
Thanks for the help,
Tauren