Java consuming too much CPU resources (513 Views)
Reply
Valued Contributor
ManojK_1
Posts: 271
Registered: ‎03-21-2007
Message 1 of 14 (513 Views)
Accepted Solution

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
Honored Contributor
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 2 of 14 (513 Views)

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.
Acclaimed Contributor
Dennis Handly
Posts: 25,182
Registered: ‎03-06-2006
Message 3 of 14 (513 Views)

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
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 4 of 14 (513 Views)

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
Honored Contributor
Bill Hassell
Posts: 14,209
Registered: ‎05-29-2000
Message 5 of 14 (513 Views)

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
Exalted Contributor
Steven E. Protter
Posts: 33,806
Registered: ‎08-15-2002
Message 6 of 14 (513 Views)

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
Valued Contributor
ManojK_1
Posts: 271
Registered: ‎03-21-2007
Message 7 of 14 (513 Views)

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
Valued Contributor
ManojK_1
Posts: 271
Registered: ‎03-21-2007
Message 8 of 14 (513 Views)

Re: Java consuming too much CPU resources

Sorry Friends,

Forgotten to attach the attachment. Please find it here.
Thanks and Regards,
Manoj K
Acclaimed Contributor
Dennis Handly
Posts: 25,182
Registered: ‎03-06-2006
Message 9 of 14 (513 Views)

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.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 10 of 14 (513 Views)

Re: Java consuming too much CPU resources

Hi:

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

Regards!

...JRF...
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 11 of 14 (513 Views)

Re: Java consuming too much CPU resources

Here's your biggest memory and cpu consumer :

Virtual Memory

vsz,sz,state,pid,ppid,comm | sort -rn | head

244740 61067 15809 15807 jpqn

pid = 15809
ppid = 15807

CPU

UNIX95=1 ps -e -o cpu,pcpu,state,pid,ppid,comm | sort -rn | head
255 71.21 R 15809 15807 jpqn

pid = 15809
ppid = 15807

Rerun and paste this command.

UNIX95=1 ps -e -o vsz,sz,state,pid,ppid,comm | sort -rn | head
Support Fatherhood - Stop Family Law
Valued Contributor
ManojK_1
Posts: 271
Registered: ‎03-21-2007
Message 12 of 14 (513 Views)

Re: Java consuming too much CPU resources

Hi Michel,

In the system my main concern is cpu usage. For that i have used the following command and the output is attached with this mail.

UNIX95=1 ps -e -o pid,ppid,cpu,pcpu,vsz,sz,comm | sort -rnk4 |more

I have also run the command as you mentioned and the output is also there in the attachment.
Thanks and Regards,
Manoj K
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 13 of 14 (513 Views)

Re: Java consuming too much CPU resources

Hi Manoj:

You've got a memory leak problem with pid 15809.

wkt24u02#UNIX95=1 ps -e -o vsz,sz,state,pid,ppid,comm | sort -rn | head
1530884 382591 R 15809 15807 jpqn
177264 26840 R 11167 1 java
70844 12042 R 25883 1 java

If you compare the vsz consumption in the first attachement you'll a huge growth. This jave application is not releasing memory. It needs to go back to the programmers.
Support Fatherhood - Stop Family Law
Valued Contributor
ManojK_1
Posts: 271
Registered: ‎03-21-2007
Message 14 of 14 (513 Views)

Re: Java consuming too much CPU resources

Thanks to all for helping me to get some idea.

I have raised this issue with our application team and they were checking it in CODE level, so i am closing this thread.

Thanks again.

Manoj K
Thanks and Regards,
Manoj K
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.