Increasing HEAP size for a Java process vs. kernel parameters (586 Views)
Reply
Occasional Advisor
Pavel Moravec
Posts: 12
Registered: ‎10-29-2008
Message 1 of 4 (586 Views)

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.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 4 (586 Views)

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...
Honored Contributor
skt_skt
Posts: 1,875
Registered: ‎12-27-2006
Message 3 of 4 (586 Views)

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
Honored Contributor
Don Morris_1
Posts: 797
Registered: ‎05-08-2001
Message 4 of 4 (586 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.