Operating System - HP-UX
1827459 Members
4069 Online
109965 Solutions
New Discussion

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...
Michael Steele_2
Honored Contributor

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
ManojK_1
Valued Contributor

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
Michael Steele_2
Honored Contributor
Solution

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
ManojK_1
Valued Contributor

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