RFC: Deprecate OldSize to simplify heap setup
stefan.johansson at oracle.com
Thu Mar 27 12:03:08 UTC 2014
To give you some background. Today there are a lot of flags to let the
user specify how to set up the heap. We have -Xms, -Xmx and -Xmn
corresponding to the flags InitialHeapSize, MaxHeapSize and NewSize. To
let the user have even more "freedom" we have MaxNewSize and OldSize.
These are all flags that take a give size, but we also have other flags
affecting the heap setup, for example NewRatio and MaxRAMFraction. All
these flags are then taken into account to setup the heap per the users
request, but if the user have specified contradicting options we warn
and do a qualified guess what the user actually wanted.
So this might not sound so bad but for the generational GCs the
generations are set up iterative and having a lot of flag values that
should be honored makes that a pretty complex task. Right now it is
probably more complicated than it have to be and I've just done a small
clean up of the code try to simplify it. One thing I noted during this
clean up was that OldSize doesn't provide any real value, you can
achieve the same behavior by setting InitialHeapSize and NewSize and
removing OldSize would simplify setting up the heap since the old
generation would then always be what's left after setting up young.
So my questions are. Would it be possible to deprecate OldSize in JDK9?
Is it a flag that we think/know is widely used? All comments and input
More information about the hotspot-dev