Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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
Highlighted
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.