Well there are couple of things.
- Program will start with -Xms value and if the value is lesser it will eventually force GC to occur more frequently
- Once the program reaches -Xms heap, jvm request OS for additional memory and eventually grabs -Xmx that requires additional time leading to performance issue, you might as well set it to that at the beginning avoiding jvm to request additional memory.
It is very nicely answered here – https://developer.jboss.org/thread/149559?_sscc=t