Operating System - HP-UX
1833768 Members
2515 Online
110063 Solutions
New Discussion

Unable to Reserve Heap of 1GB for Java 1.3.0 on 11i

 
Stephen Feldman
Occasional Contributor

Unable to Reserve Heap of 1GB for Java 1.3.0 on 11i

I'm running into a situation where I am unable to allocate a full 1GB (-Xms1024m -Xmx1024m -Xmn256m) on start-up of my application. I'm able to get 800mb (-Xms800mb -Xmx800mb -Xmn200m), but the minute I try to increase my heap, I receive the following message "JVM Error...Unable to allocate enough memory on start-up".

I've applied the appropriate patches/bundles and made major kernel adjustments after running HPJconfig, HPJmeter and a few other utilities.

I've attached some of my current parameters:

max_thread_proc 3000
maxfiles 2048
maxfiles_lim 2048
ncallout 6000
nkthread 6000
nfile 30010
nproc 4088
maxdsiz 503866
maxssiz 19531
maxtsiz 16384
maxuprc 4078
dbc_max_pct 7
dbc_min_pct 2
ninode 4768
maxusers 512

**Also, I have about 8GB of swap space and swapmem_on is set to 1.

Any recommendations? I'm a little stumped...

I guess what I am getting at...Am I limited to a certain heap size on start-up, always, or not at all depending on the physical RAM on my server. I have 4GB on this server and nothing else is running....

 

 

P.S. this thread has been moved from Archived Desktops and Workstations Boards > general to HP-UX > languages - HP forums moderator

3 REPLIES 3
oiram
Regular Advisor

Re: Unable to Reserve Heap of 1GB for Java 1.3.0 on 11i

Hi,

Have you solved the problem? I am suffering a similar one.

Best regards.
Stephen Feldman
Occasional Contributor

Re: Unable to Reserve Heap of 1GB for Java 1.3.0 on 11i

Yes, I ended up solving the issue. My solution was two fold...Upgraded to JDK 1.3.1.05 and found a bug with Java on HP...

I was finally able to allocate a full 1024mb or 1Gb for a ms and mx in my heap. I was able to do this by tweaking a property in java command.

I came across this fix by accident. Here's my best attempt at explaining how I came to this resolution...

I read a reference on HP's Java Site in regards to allocating 1G of heap at...

http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/hotspot.html (specifically the -pa11 (version 1.2.2 and later) PA-RISC only section)

I was confident that I was running PA2.0, because when I typed java -version, I would receive the following output...

manumgr@civic> java -version
java version "1.3.1.05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.05-020425-12:07)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.05-JPSE_1.3.1.05_20020425 PA2.0, mixed mode)

Notice the PA2.0...Well, when I started up the server. I would get a similar message. The only difference was the following:

manumgr@civic> java -version
java version "1.3.1.05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.05-020425-12:07)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.05-JPSE_1.3.1.05_20020425 PA1.1, mixed mode)

It wasn't making any sense to me as to why PA1.1 was chosen over PA2.0. According to the link above, the only way to invoke PA1.1 is to actually specify...
java -pa11 -version

So I went into my JAVA_HOME/bin directory and opened the java file in vi. The first thing I noticed was the following line...

PROC=`getconf CPU_VERSION`

Every time I started the server, I was getting an odd message /opt/java130/bin/java[85]: getconf: not found...So I figured it had something to do with this reference...

I then came across...

case ${PROC} in
768)
#
# IA64
#
suffix=so
proc=IA64
;;
532)
#
# PA-RISC 2.0
#
suffix=sl
proc=PA_RISC2.0
;;
*)
#
# PA-RISC 1.1
#
suffix=sl
proc=PA_RISC

This script tells me that if PROC =768, then choose IA64, if PROC= 532 then choose PA2.0 and if PROC=* then choose PA1.1. I'm thinking that * over-rides 532. So I manually called getconf CPU_VERSION and was returned the value 532. That being the case, PA2.0 should have been chosen. So what I did was changed the following and I was able to utilize a larger heap...

*)
#
# PA-RISC 2.0
#
suffix=sl
proc=PA_RISC2.0
;;
532)
#
# PA-RISC 1.1
#
suffix=sl
proc=PA_RISC

getconf is in my path. For some reason it is not found by java. I'm not happy with this fix, so I am going to go a little more deeper with my environmental variables.


oiram
Regular Advisor

Re: Unable to Reserve Heap of 1GB for Java 1.3.0 on 11i

Hi Stephen,

Thanks a lot for your help, I don??t know how to give you points but consider you have 10.

Best regards.