Increase heap size in Java

后端 未结 12 2300
情深已故
情深已故 2020-11-21 05:26

I am working on a Windows 2003 server (64-bit) with 8 GB RAM. How can I increase the heap memory maximum? I am using the -Xmx1500m flag to increase the heap siz

12条回答
  •  遥遥无期
    2020-11-21 06:02

    Can I increase the heap memory to 75% of physical memory(6GB Heap).

    Yes you can. In fact, you can increase to more than the amount of physical memory, if you want to.

    Whether it is a good idea to do this depends on how much else is running on your system. In particular, if the "working set" of the applications and services that are currently running significantly exceeds the available physical memory, your system is liable to "thrash", spending a lot of time moving virtual memory pages to and from disk. The net effect is that the system gets horribly slow.

提交回复
热议问题