In my working environment, we have a number of Enterprise Java applications that run on Windows Server 2008 hardware. An external consultant studied the performance of our Java applications and suggested changing the initial and maximum memory values so that they are identical.
So, currently we are launching the application with 1 GB of initial and 2 GB of maximum memory. Their recommendation is to change the initial and maximum memory to both 2 GB.
Their reasoning is 2 times ...
, , , Java , . , , , , , , .
, , 2, , , . , , Java, .
- , , . - ?
. , GC , , , , . . , , . 2 , , 400 , , 100 , . , . , , .
# 1 , , , . , , . . , 2 , 4 . / , , .
, . . , 2 Java-, , 2 . , , , .
2- . - -. . 2 - . ? , .
, , , 2 . . , , 2 , , - .
, , , . , 2 .
, ... . REAL . , .
JVM, , . . e..g 2G 2G. . ( , )
. , JVM ( , )
The real impact is that the small heap size can cause temporary objects to move into a space that is expensive to clean. A larger heap size may mean that temporary objects are discarded many times before being copied and deleted with full gc.