It's not a secret anymore!*
The moose likes Performance and the fly likes CPU utilisation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "CPU utilisation" Watch "CPU utilisation" New topic
Author

CPU utilisation

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Hi guys,

I've a web application running on WLS 8.1 on Sun OS 5.8. Recently noticed that our CPU usage is hitting 20% at the same day time interval. Are there any tools that we can use to identify which codes is causing the increase in CPU usages?

Many thanks for the help


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Well, the first thing to do is finding out which *process* is responsible for the load. Perhaps there is some virus scanner running on it, or something?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
We saw the PID hogging the resources, but they don't translate into anything sensible to us. Is there anything similar to HPROF that is stable enough for JVM 1.4.1? For some reasons, I'm stuck with it, at least for now.
Virag Saksena
Ranch Hand

Joined: Nov 27, 2005
Posts: 71
If the process hogging CPU is a Java process, You can try Auptyma's JAM. Download a trial version from www.auptyma.com, install the console on a Windows box, deploy the war file to the Weblogic console and you should be able to determine which methods are using most CPU. One thing you might notice is that you application does not slow down like it does with hprof.


<a href="http://www.auptyma.com" target="_blank" rel="nofollow">The Peak of Performance</a>
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Thanks Virag, would give it a try.

We found this piece of information while encountering high CPU usage again. Does anyone happens to know what it means? Could it be a known bug in the JVM 1.4.1?


stat64("/usr/java141_05/jre/lib/zi/Singapore", 0xCC57DAC0) Err#2 ENOENT
open("/usr/java141_05/jre/lib/zi/Singapore", O_RDONLY|O_LARGEFILE) Err#2 ENOENT
close(222) = 0
stat64("/usr/java141_05/jre/lib/zi/Singapore", 0xCC57DAC0) Err#2 ENOENT
open("/usr/java141_05/jre/lib/zi/Singapore", O_RDONLY|O_LARGEFILE) Err#2 ENOENT
John Dunn
slicker
Ranch Hand

Joined: Jan 30, 2003
Posts: 1108
Hey Chengwei,

check out this known bug in 1.4.1.

I ran into this myself and had CONSIDERABLE improvement when we went to 1.4.2


"No one appreciates the very special genius of your conversation as the dog does."
Virag Saksena
Ranch Hand

Joined: Nov 27, 2005
Posts: 71
Chengwei,
It looks like you posted some truss output over there. Which is looking for and trying to open /usr/java141_05/jre/lib/zi/Singapore which does not exist.

#1. Is this happening repeatedly, or does it go away ? Because I suspect once it finds that this file is not found, it will try /usr/java141_05/jre/lib/zi/Asia/Singapore and will find the file it is looking for.

#2. If this keeps on happening, you could try creating a symbolic link with
ln -s /usr/java/141_05/jre/lib/zi/Asia/Singapore /usr/java/141_05/jre/lib/zi/Singapore

#3. Where did you get the output from ? This is normally a truss output, and running truss on production will increase the CPU usage

#4. You might be getting this error due to a locale/language setting ?
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Originally posted by John Dunn:
Hey Chengwei,

check out this known bug in 1.4.1.

I ran into this myself and had CONSIDERABLE improvement when we went to 1.4.2


I'm actually safe from this known bug since it was fixed in 1.4.1_05. Thanks for pointing it out.
[ December 05, 2006: Message edited by: Chengwei Lee ]
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884

#1. Is this happening repeatedly, or does it go away ? Because I suspect once it finds that this file is not found, it will try /usr/java141_05/jre/lib/zi/Asia/Singapore and will find the file it is looking for.

Saw this once from our system administrator. Not sure if its recurring since we don't do truss output often.


#4. You might be getting this error due to a locale/language setting?

I'm on Solaris, did saw some settings from my console logs that I've this set. How do I correct it?

Many thanks for helping.
[ December 05, 2006: Message edited by: Chengwei Lee ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CPU utilisation