-XX:NewSize and -XX:MaxNewSize

We can set the size of the Young Generation using -XX:MaxNewSize. The Young Generation resides under the total heap memory and the Old Generation size will be smaller if we set the size of the Young Generation as large. The Young Generation size should never be larger than the Old Generation for stability reasons. Thus, -Xmx/2 is the maximum size we can set for -XX:MaxNewSize.

To achieve better performance, set the initial size of the Young Generation by setting the -XX:NewSize flag. This saves some costs in terms of the Young Generation growing to that size over time.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset