Operating System - Linux
1824635 Members
4228 Online
109672 Solutions
New Discussion юеВ

Java heap size change and linux kernel

 
Wilfred Chau_1
Respected Contributor

Java heap size change and linux kernel

Hi all
If I were to increase the java heap size to 1GB (with +Xms option), is there any kernel parameters changes need to be changed?

Thanks.
2 REPLIES 2
Mike Stroyan
Honored Contributor

Re: Java heap size change and linux kernel

You won't need to change any kernel parameters to use a 1GB heap.

The -Xms option is actually the initial heap size rather than the maximum heap size. Starting with a larger initial heap size can improve early performance of java jvm processes by putting all the allocation overhead up front and reducing the number or allocation steps as a process is initially growing to a maximum heap size.

You may need to set the maximum heap size with -Xmx in addition to setting the initial heap size with -Xms. The -Xms value can't be larger than the -Xmx limit. The default for -Xmx is only 64M for a 32-bit sun java 1.5 jvm. The default for -Xmx is 1GB on a 64-bit sun java 1.5 jvm.
Wilfred Chau_1
Respected Contributor

Re: Java heap size change and linux kernel

Thanks much.