Operating System - HP-UX
1826269 Members
3595 Online
109692 Solutions
New Discussion

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

 
sheevm
Regular Advisor

setting up heap size for Java application in HPUX 11i v2 PA-RISC

Hi All,

Anyone out there give me some tips on how to set/change the heap size? Is there any O.S level kernel parameters needs modification?

Thanks in advance for your help.

Rajim
be good and do good
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

Hi:

Ultimately, the limit for the heap size is going to be governed by 'maxdsiz' for 32-bit processes or by 'maxdsiz_64bit' for 64-bit processes. Hence, you may need to increase the appropriate kernel parameter.

Regards!

...JRF...
sheevm
Regular Advisor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

James,

We have 16GB memory and 4 Processors.

What would be the numbers I need to set it to these two parameters you mentioned?

Appreciate your assistance on this.

Thanks
RAJIM
be good and do good
spex
Honored Contributor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

Hi Rajim,

To increase the max. size of Java's memory allocation pool:

# java -Xmx ...

PCS
sheevm
Regular Advisor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

Hi PCS,

Where can we set this? Is this Java Configuration? or HP-UX configuration?

Please help.

Thanks.
Rajim
be good and do good
James R. Ferguson
Acclaimed Contributor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

Hi (again) Rajim:

The value you need and/or choose will depend upon your specific environment.

Like most kernel parameters, 'maxdsiz' and 'maxdsiz_64bit' are simply "fences". They are boundries or limits to prevent any one process from consuming more of a resource than it should.

http://docs.hp.com/en/B2355-60105/maxdsiz.5.html

Regards!

...JRF...
spex
Honored Contributor

Re: setting up heap size for Java application in HPUX 11i v2 PA-RISC

Rajim,

'-Xmx' is a switch to the 'java' command that allows you to specify the JVM heap size. For example:

# java -Xmx500m -jar YourApp.jar
will set the JVM heap to 500MB.

The JVM heap size cannot exceed 'maxdsiz' or 'maxdsiz_64bit'. If you wish to make the heap size larger than 'maxdsiz_64bit' (for 64-bit), you must first increase this kernel parameter and recompile.

Also, please remember to assign points to any responses that helped you. You are currently at 74/160.

PCS