Languages and Scripting

Java consuming too much CPU resources

 
SOLVED
Go to solution
ManojK_1
Valued Contributor

Java consuming too much CPU resources

Hi Friends,

In my rx3600 server the cpu utilisation always showing more than 100%.

The main process which is consuming more CPU is "JAVA".Please find the attachment.

Server Configuration:
rx3600
CPU info: Number of CPUs = 4
Clock speed = 1595 MHz
Memory = 12257 MB (11.969727 GB)

PatchSet Details
QPKAPPS B.11.23.0706.064 Applications Quality Pack Bundle for HP-UX 11i v2, June 2007
QPKBASE B.11.23.0706.064 Base Quality Pack Bundle for HP-UX 11i v2, June 2007
HWEnable11i B.11.23.0706.064 Hardware Enablement Patches for HP-UX 11i v2, June 2007

wkt24u02#which java
/opt/java1.5/bin/java


There is any fine tune i have to do for JAVA?
Thanks in advance,
Manoj K
Thanks and Regards,
Manoj K
13 REPLIES 13
Steven Schweda
Honored Contributor

Re: Java consuming too much CPU resources

> [...] rx3600 [...]
> [...] B.11.23 [...]

You might try asking in an HP-UX forum,
instead of in this Tru64 forum.

> Please find the attachment.

This might be easier if you attached one.
Dennis Handly
Acclaimed Contributor

Re: Java consuming too much CPU resources

(I've asked the moderators to move this to HP-UX > Languages.)

Have you tried glance or HPjmeter to check your performance?
http://www.hp.com/go/hpjmeter
Michael Steele_2
Honored Contributor

Re: Java consuming too much CPU resources

Hi Manoj:

Can you paste in the report from these commands?

UNIX95=1 ps -e -o vsz,rss,sz,pid,ppid,comm | sort -rna | head

UNIX95=1 ps -e -o cpu,pcpu,state,pid,ppid,comm | sort -rna | head
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: Java consuming too much CPU resources

I think you will find that this is a very common situation for Java. Java is very convenient in many ways but it also allows terribly inefficient code to be created if the programmer is not careful. The usage more than 100% is an artifact when a program spawns many threads. Your programmer will have to fix the problems. Use the HP Java website as a starting point:

http;//www.hp.com/go/java


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: Java consuming too much CPU resources

Shalom,

This is either Java or the app.

Or both.

Find the leak, then act:

http://www.hpux.ws/?p=8

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ManojK_1
Valued Contributor

Re: Java consuming too much CPU resources

Hi Dennis,

I have used hpjmeter for monitoring java, The cpu usage and Java Method hotspot output is there in the attached file (1)

Hi Michael,

System is not accepting sopme options from the given command eg:- rss & a (sort -rna)
So i have run the commands as follows and the output is there in the attached file.
UNIX95=1 ps -e -o vsz,sz,pid,ppid,comm | sort -rn | head
UNIX95=1 ps -e -o cpu,pcpu,state,pid,ppid,comm | sort -rn | head

Hi Steven,
This is an application called TCServer (Temenos core banking service) which is using java.
I am not having any problem with memory, but the bottleneck is there with cpu.

Thanks & waiting for the reply,
Manoj K
Thanks and Regards,
Manoj K
ManojK_1
Valued Contributor

Re: Java consuming too much CPU resources

Sorry Friends,

Forgotten to attach the attachment. Please find it here.
Thanks and Regards,
Manoj K
Dennis Handly
Acclaimed Contributor

Re: Java consuming too much CPU resources

>Please find it here.

Basically top has:
119.35% in java and steady, using 840 Mb. jpqn is also using a lot.
HPjmeter says you are spending 89% of your time in Util.splitV.
So you need to talk to the developers.
James R. Ferguson
Acclaimed Contributor

Re: Java consuming too much CPU resources

Hi:

Have you considered analyzing what the *application* code is doing?

Regards!

...JRF...