Operating System - HP-UX
1830939 Members
1644 Online
110017 Solutions
New Discussion

Java Large Memory Heap Size

 
Amit Dixit_2
Regular Advisor

Java Large Memory Heap Size

Hi,
We are running HP-UX B-11.11 PA-RISC
and HP-JVM 1.4.2
We recently installed patches, so that we can upgrade the heap size from 2 gb to 4gb.

But when I change the heap size setting in the startup script of the server -Xmx and Xmn the server doesn't get started and generates the following error message

/usr/lib/dld.sl: Call to mmap() failed - TEXT /opt/java1.4/jre/lib/PA_RISC2.0/native_threads/libhpi.sl
HPI dlopen failed: Exec format error

Does anyone know what is the problem.

Thaks,
Amit.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Java Large Memory Heap Size

Are you running the 32 bit OS or the 64 bit OS.

If you are 32, that might explain the trouble. Address limits. Think about memory windows.

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
Steve Steel
Honored Contributor

Re: Java Large Memory Heap Size

Hi

It is always address space and memory windows is needed

see
ftp://eh:spear9@hprc.external.hp.com/memory.htm#memory_windows


For memory windows details

You are running out of space


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Amit Dixit_2
Regular Advisor

Re: Java Large Memory Heap Size

Hi,
We are running 64 bit O.S., so it should support this memory issue. And to have HP-JVM 1.4.2 up and running with this large memory heap we installed the required patches still I am getting this error.

Don Morris_1
Honored Contributor

Re: Java Large Memory Heap Size

The OS is 64-bit, but if the application is 32-bit, you're still limited to a 4Gb address space, of which 2Gb is by default globally shared. If you want >2Gb private space, you must use chatr (or I think there's a linker option - but obviously you won't want to relink java) to use Q3 and/or Q4 private. This will get very interesting if you want a 4Gb heap *and* need to load shared libraries (i.e. you won't be able to do it... I'd expect a 3Gb heap at best for an app like Java, since I also expect it to heavily use system shared libraries). More details on address space layout, etc. are in the Memory Management whitepaper (http://docs.hp.com/en/1218/mem_mgt.html).

You'll also need to set maxdsiz / maxdsiz_64bit to 4Gb, if Java literally uses heap and not MAP_PRIVATE mmap's.
RAC_1
Honored Contributor

Re: Java Large Memory Heap Size

You will have to tune your setting for maxtsiz_64bit. How much RAM do you have??

Also be up to date on Java patches.
hp.com/go/java

Also, just eager to know, why you need so much heap size??

Anil
There is no substitute to HARDWORK