Duplicate :
|
Name: rmT116609 Date: 09/22/2004 A DESCRIPTION OF THE REQUEST : The memory usage of the JVM should be dynamic. The "-Xmx" option just sets a maximum limit. If the application exceeds this limit an OutOfMemoryError occurs. Once occupied memory is not returned back to the operating system. For multithreaded server applications, this can easily lead to an OutOfMemoryErrror and the application basically crashes (because it can't perform the tasks without memory). JUSTIFICATION : If the JVM would take as much memory as it can get from the OS (only if required), there would be no need for the fixed "-Xmx" maximum memory option. If the JVM would return unused memory back to the operating system, the application would just have some times that it uses much memory (eventually slowing down the server through swapping) and afterwards performs nicely again (because it doesn't need to swap anymore). EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Memory usage of java applications (java.exe) not only increases but also decreases. ACTUAL - Memory usage of java applications just increases (perhaps leading to an OutOfMemoryError), with the result that other applications on the server get less memory and never have a chance to get more. (Incident Review ID: 311498) ======================================================================