Get JVM to grow memory demand as needed up to size of VM limit?

后端 未结 14 1305
渐次进展
渐次进展 2020-12-29 07:42

We ship a Java application whose memory demand can vary quite a lot depending on the size of the data it is processing. If you don\'t set the max VM (virtual memory) size

14条回答
  •  醉梦人生
    2020-12-29 08:11

    There is two options in the virtual machine arguments that can be used : -Xms to set the memory size at startup and -Xmx to set the maximum memory size...

    You can set a low startup memory and a big maximum one, so the VM will allocate new memory only if needed.

提交回复
热议问题