What exactly does -Xms
mean in terms of Java heap memory? We are running in a 1024-2048 min-max memory allocation. Due to some issues we turned it down from 2048 to 1728 max and from 1024 to 512 min.
How does -Xms
affect heap memory allocation and why does the max memory decrease when -Xms
values are decreased?
The Xms flag tells to your JVM the amount of memory for initial allocation. If your program need more memory than the value specified in Xms the JVM will take more memory until the limit specified in Xmx.
Remember that the JVM will reserve the amount of memory setted in Xms even if your application don't use them. And it don't be available for OS so you need consider let to the OS and the other programs enough memory in order they can work fine.