Operating System - HP-UX
1745786 Members
3388 Online
108722 Solutions
New Discussion юеВ

Increasing HEAP size for a Java process vs. kernel parameters

 
Pavel Moravec
Occasional Advisor

Increasing HEAP size for a Java process vs. kernel parameters

Hello all,
due to increasing memory dempands of our Java application, we plan to increase its heap size from 4GB to 5GB (changing "-Xmx4096 -Xmx
4096 to -Xmx5120). What kernel parameters could restrict full utilisation of the increase? I am aware of:

maxdsiz
maxdsiz_64bit
maxssiz
maxssiz_64bit
maxtsiz
maxtsiz_64bit

I am not sure if:

maxfiles
maxfiles_lim
maxswapchunks
maxuprc
nbuf
nfile
swchunk
nproc
npty

could also have an impact or not. Please, what parameters should be checked for the increasing of java heap size? Thanks in advance for a feedback.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Increasing HEAP size for a Java process vs. kernel parameters

Hi Pavel:

The data or heap space is going to be limited by 'maxdsiz' for 32-bit processes and by 'maxdsiz_64bit' for 64-bit processes. These should be the only parameters you need to factor into your increase.

Regards!

...JRF...
skt_skt
Honored Contributor

Re: Increasing HEAP size for a Java process vs. kernel parameters

assuming you have a 64 bit application and that case only chaning maxdsize64bit goign to help .Looke like you can change the value online from 11.23 onwards

#kctune -q maxdsiz_64bit
Tunable Value Expression Changes
maxdsiz_64bit 10737418240 10737418240 Immed
Don Morris_1
Honored Contributor

Re: Increasing HEAP size for a Java process vs. kernel parameters

With the caveat that this only affects new processes (ones already running keep the limit from the time they started... otherwise you'd have to potentially go kill folks when the limit was lowered and other messy things).

Technically you should look at the Total line, Free column of "swapinfo -atm"... The Java heap will need swap reservation to be created, so your total swap comes into play. Hence you may need to care about maxswapchunks (only on 11.0 or 11.11, obsolete on later releases), swchunk and swapmem_on (obsolete on 11.31) since those can affect configured swap space. Most likely there's still plenty of swap space, though... just check to be sure.