What happens when we set Xmx and Xms equal size [duplicate]
Asked Answered
D

1

10

When we set the values of Xms and Xmx to be equal, what is the impact on the FullGC, or allocation for young/ tenured gen in HotSpot.

Does it make any difference in JRockit?

Disable answered 18/4, 2013 at 15:32 Comment(1)
Does this answer your question? Is it good to set the max and min JVM heap size the same?Thomism
T
11

Setting these two parameters to the same value is a best practice. It will prevent the JVM from resizing the heap. The main effect is that all the other parts of the heap, especially the generations, do not change due to heap resizing. This allows to much better understand and configure the heap. It also removes pauses caused by resizing the heap. The only secnario where one would not do it is a client java application, which competes with many other applications over available memory. In todays use cases, you often can assign a fixed chunk of memory to java (in all server apps for example)

Timotheus answered 20/8, 2013 at 11:30 Comment(1)
But the question was what is the impact on the FullGC and does it make any difference when we set this in jRockitDisable

© 2022 - 2024 — McMap. All rights reserved.