My application is using fixed heap size i.e. -Xms = -Xmx but even after some Googling I couldn't understand what is the advantage of fixed heap size. If any JVM expert could please throw some light on it.
My application is using fixed heap size i.e. -Xms = -Xmx but even after some Googling I couldn't understand what is the advantage of fixed heap size. If any JVM expert could please throw some light on it.
If you keep -Xms the same as -Xmx then a couple of things happen:
-Xms is not same as -Xmx.I am not sure if there is any real advantage in this but I think it is just that you get a controlled environment where you get a good heap size right from the start (which is mentioned in the Oracle docs).
From Oracle docs: if you know the heap size requirement of your application then you should use fixed heap size otherwise you should go with either of the options - (1.) use -Xmx and -Xms (2.) don't use -Xmx and -Xms, and instead specify the garbage collector you want to use and it will grow and shrink the heap.