How and where we can increase min and max heap size during edge server installation.

Not applicable

We were installing Gateway we got the error "Error occurred during initialization of VM.Minimum heap size (-Xms) specified to be larger than max heap size (-Xmx)", there is one service which did not start "apigee-cassandra"

I changed the min and max heap size of "cassandra-env.sh file at path "/opt/apigee/apigee-cassandra/conf" and it started working. But we hardcoded it which i am not sure correct or not.

I have attached the file here itself (changed the extension from ".sh" to ".txt".)

1 1 1,673
1 REPLY 1

@Bharti Sharma

The Xmx and Xms are calculated based on MAX_HEAP_SIZE. There is an internal logic based on which the MAX_HEAP_SIZE is calculated which is :

# max(min(1/2 ram, 1024MB),

# min(1/4 ram, 8GB))

# calculate 1/2 ram and cap to 1024MB

# calculate 1/4 ram and cap to 8192MB

# pick the max

So it is not necessary for either of Xms or Xmx to be hardcoded and it is not advisable to do so.

You can choose to over-ride the calculated values, but please ensure that you do so as below :

"Override these to set the amount of memory to allocate to the JVM at # start-up. For production use you may wish to adjust this for your # environment.

MAX_HEAP_SIZE is the total amount of memory dedicated # to the Java heap; HEAP_NEWSIZE refers to the size of the young # generation.

Both MAX_HEAP_SIZE and HEAP_NEWSIZE should be either set # or not (if you set one, set the other)."

The above section is available as a quote in the cassandra-env.sh