Operating System - HP-UX
1820590 Members
2470 Online
109626 Solutions
New Discussion юеВ

Java core dump (OutOfMemory) and kernel setting

 
Bambang Lestari
Occasional Contributor

Java core dump (OutOfMemory) and kernel setting

I have a java application running on HP-UX 11.11 and JDK 1.3.0.00.
At the moment it dumps core a lot of times with OutOfMemory message.

It would be appreciated if someone can share his/her experience on this matter.

I write down all the information might be needed.

Thanks & Regards,
Bambang Lestari


Server Info:
============
OS: HP-UX 11.11
CPU: PA-RISC
Memory: 4GB

(Currently, it has less both CPU and memory utilization)


Kernel Parameters:
==================
maxdsiz = 2048MB
maxdsiz_64bit = 2048MB
maxssiz = 8MB
maxssiz_64bit = 8MB
maxtsiz = 64MB
maxtsiz_64bit = 1024MB
max_thread_proc = 3000
nkthreads = 6000
nfiles = 30000
maxfiles = 5000
maxfiles_lim = 5000
ncallout = 6000
nproc = 2068
swapmem_on = 0
the rest... (see attachment)


Patches info:
=============
The following patches are already installed:
PHCO_24777
PHKL_24253
PHKL_24254
PHKL_24255
PHKL_24256
PHKL_24551
PHKL_24751
PHNE_24035


Swap info:
==========
# swapinfo -tm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol2
dev 2048 0 2048 0% 0 - 1 /dev/vg00/lvol9
reserve - 1309 -1309
total 4096 1309 2787 32% - 0 -


Java info:
==========
JDK 1.3.0.00


User Limits:
============
Shell: /usr/bin/ksh (where the java application is running through)
$ ulimit
1000000

$ ulimit -a
ksh: ulimit: bad option(s)

$ sh
$ ulimit -a
time(seconds)unlimited
file(blocks)1000000
data(kbytes)unlimited
stack(kbytes)8192
memory(kbytes)unlimited
coredump(blocks)4194303
nofiles(descriptors) 5000
$


Core dump info:
===============
# file core
core:core file from 'java'

5 REPLIES 5
Bill McNAMARA_1
Honored Contributor

Re: Java core dump (OutOfMemory) and kernel setting

Get Jconfig to report on kernel params.

http://www.hp.com/products1/unix/java/java2/hpjconfig/index.html


Jmeter can analyse your applications:

http://www.hp.com/products1/unix/java/hpjmeter/index.html



The Java perf page gives a generic sam kernel tunable set.

http://www.devresource.hp.com/JavaATC/JavaPerfTune/index.html
and instructions how to install it:


Java Generic Server

maxusers 400
max_thread_proc maxusers*3
maxfiles 2048
maxfiles_lim 2048
ncallout 2*((((nproc*7)/4)+16)*2)
nkthread 2*max_thread_proc
nfile (2*nproc)+1000
nproc ((maxusers*5)+64)


Later,
Bill
It works for me (tm)
Stephen Feldman
Occasional Contributor

Re: Java core dump (OutOfMemory) and kernel setting

Bambang,

I noticed you had swapmem_on 0. You should set that to 1 (true) to avoid swap issues.

I have a question for you. How much memory are you setting for your heap size (-Xms256m -Xmn256 -Xmn64m). The reason that I ask, is that I am having issues getting my heap beyond 800mb on a similar environment that you have and I was curious if you were able to get to a full 1024mb or 1gb of Heap?

Steve
oiram
Regular Advisor

Re: Java core dump (OutOfMemory) and kernel setting

Hi,

I have a similar problem. A java application works with a java heap of 512 Mg but if we set a java heap of 800 Mg it doesn??t work. Have you solved your problem?

Best regards.

John Argo
Occasional Contributor

Re: Java core dump (OutOfMemory) and kernel setting

I have had similar issues allocating a larger heap size. I have been able to set -mx to 1498 but never higher. This seems to have made the system more prone for memory faults. I set high maxtsiz_64 and maxdsiz_64 which may or may not be appropriate for your system

maxdsiz_64=17179869186
maxtsiz_64=1073741824
maxssiz_64=137922056

These were also set to support a different app on system, not just my java app. I have found that the java applications runs much more reliably with -mx=850. Make sure patches are up to date

I'm not sure if this will help your situation or be appropriate.

Mike Stroyan
Honored Contributor

Re: Java core dump (OutOfMemory) and kernel setting

Bambang,
You could look at this document about getting more memory space from a 32-bit java such as the java 1.3 releases.
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/expanding_memory.html

John,
As I noted in reply to your February question- " JDK on HP-UX 11i 64 or 32 bit?", you can't get to the 64 bit address limits with a java 1.3 release. The java 1.4 releases include support for a -d64 option to get 64 bit addresses. You will need new 64-bit versions of any JNI libraries that you use. There are details in the release notes-
http://www.hp.com/products1/unix/java/java2/sdkrte14/infolibrary/sdk_rnotes_1.4.1.00.html#HotSpot_options