简体   繁体   中英

What happens when we set Xmx and Xms equal size

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM